extcode / tcpdf

0 stars 9 forks source link

Document root path is prepended to absolute path #11

Open garfieldius opened 3 years ago

garfieldius commented 3 years ago

Method \Extcode\TCPDF\Service\TsTCPDF::renderStandaloneView evaluates file paths into an absolute path, which is then used as the files URL. Method \TCPDF::openHTMLTagHandler checks if a file path starts with the document root and prepends it if not. When having a different web document root than TYPO3 document root, like when using helhum/secure-web, the document root gets prepended to the already absolute path.

The method should check if a file exists, thus check if the path needs to be fixed before trying to actually fix it.