fix control for all PHP versions

This commit is contained in:
nicolaasuni 2024-10-06 11:54:28 +01:00
parent bfa7d2b6d4
commit 4cf1ab192e

View File

@ -19059,7 +19059,7 @@ class TCPDF {
} else if (preg_match('@^data:image/([^;]*);base64,(.*)@', $imgsrc, $reg)) {
$imgsrc = '@'.base64_decode($reg[2]);
$type = $reg[1];
} elseif (str_contains($imgsrc, '../')) {
} elseif (strpos($imgsrc, '../') !== false) {
// accessing parent folders is not allowed
break;
} elseif ( $this->allowLocalFiles && substr($imgsrc, 0, 7) === 'file://') {