register shop host as allowed to prevent security check issues

Cette révision appartient à :
2025-05-14 13:22:59 +02:00
Parent e9c88117da
révision 10c08da415

Voir le fichier

@ -71,6 +71,9 @@ 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);