mittwald / typo3-web2pdf

A TYPO3 extension for rendering content as PDF
GNU General Public License v2.0
18 stars 20 forks source link

PDFs on ISAPI/IIS/FCGI/FPM configured Webserver will not determine the correct url protocol #88

Closed Qixuga closed 6 years ago

Qixuga commented 6 years ago

PDFs on ISAPI/IIS/FCGI/FPM got wrong url-protocol - https instead of http. The reason ist the following function:

typo3conf/ext/web2pdf/Vendor/mpdf/mpdf/mpdf.php

function SetBasePath($str='') {
...
// if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) { // got wrong https on upper listen http-serverconfigs, have to be be:
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && ($_SERVER['HTTPS'] != 'off') ) {
...
}

Tested with actual module and works fine :-)

More informations look at php manual: http://php.net/manual/en/reserved.variables.server.php#HTTPS

Thank you!

pstranghoener commented 6 years ago

Thanks for the report, but its a bug in the libary of mpdf we use. Its a known bug in mpdf https://github.com/mpdf/mpdf/issues

Please report it to the guys from mpdf.

Best Regards Philipp

Qixuga commented 6 years ago

Thank you, already listen there: Method SetBasePath has incorrect condition to check whether is server HTTPS or not #297