prevent malicious versions of HTML2PDF library

This commit is contained in:
2025-05-14 21:15:52 +02:00
parent c097e06ac1
commit 6cc376125a
2 changed files with 2 additions and 5 deletions

View File

@ -71,9 +71,6 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
public function genPdf($sFilename, $iSelLang = 0, $target = self::PDF_DESTINATION_STDOUT)
{
$oPdf = oxNew(Html2Pdf::class, ...$this->getPdfProperties());
$oPdf->getSecurityService()->addAllowedHost(
parse_url(Registry::getConfig()->getShopCurrentUrl())['host']
);
$oPdf->setTestIsImage(false);
$htmlContent = $this->getHTMLContent($iSelLang);
@ -405,4 +402,4 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
return null;
}
}
}