Skip to content

Commit

Permalink
fix control for all PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni committed Oct 6, 2024
1 parent bfa7d2b commit 4cf1ab1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tcpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -19059,7 +19059,7 @@ protected function openHTMLTagHandler($dom, $key, $cell) {
} 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://') {
Expand Down

1 comment on commit 4cf1ab1

@saravana-hackz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid fix.

Please sign in to comment.