[Html2PdfConverter] Security Utils error Html2PdfConverter

[Html2PdfConverter] Security Utils error Html2PdfConverter

  
Forge Component
(50)
Published on 21 Mar by Guilherme Pereira
50 votes
Published on 21 Mar by Guilherme Pereira

We have recently begun using the Html2PdfConverter module to generate pdfs in our application. Since then we have noticed an error being generated everytime a pdf is created. 

The error is as follows: The request entity's media type 'application/x-www-form-urlencoded' is not supported for this resource.

This error has no impact on the front end but it is flooding our monitoring logs. We know it is related to the Security settings introduced in platform version 10, but have been unable to pinpoint the exact cause.

Has anyone encountered the same issue and found a solution?

After a platform upgrade to version 10.0.603 the error is now slightly clearer:

Failed to deserialize JSON to CSPReport:
Unrecognized token 'document': was expecting ('true', 'false' or 'null')


As we have not changed anything about the creation of this token, can someone explain how this token is generated and how we can prevent this error from generating?

We have the same issue on our environment. It feels like it is related to Content Security Policy being enabled (as we don't seem to get it when we disable CSP).

Any clue how to solve this?

Hello All,

To have the Htm2PdfConverter working with Content Security Policy switched on, you can update the binaries to the latest "bleading edge" versions:

Install the MinGW version, as the installation instructions and the FAQ indicate:

Hope this helps.

CA