|
1 | 1 | <?php |
2 | 2 | //============================================================+ |
3 | 3 | // File name : tcpdf.php |
4 | | -// Version : 6.8.0 |
| 4 | +// Version : 6.8.1 |
5 | 5 | // Begin : 2002-08-03 |
6 | 6 | // Last Update : 2024-12-23 |
7 | 7 | // Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - [email protected] |
8 | 8 | // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) |
9 | 9 | // ------------------------------------------------------------------- |
10 | | -// Copyright (C) 2002-2024 Nicola Asuni - Tecnick.com LTD |
| 10 | +// Copyright (C) 2002-2025 Nicola Asuni - Tecnick.com LTD |
11 | 11 | // |
12 | 12 | // This file is part of TCPDF software library. |
13 | 13 | // |
|
104 | 104 | * Tools to encode your unicode fonts are on fonts/utils directory.</p> |
105 | 105 | * @package com.tecnick.tcpdf |
106 | 106 | * @author Nicola Asuni |
107 | | - * @version 6.8.0 |
| 107 | + * @version 6.8.1 |
108 | 108 | */ |
109 | 109 |
|
110 | 110 | // TCPDF configuration |
|
128 | 128 | * TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.<br> |
129 | 129 | * @package com.tecnick.tcpdf |
130 | 130 | * @brief PHP class for generating PDF documents without requiring external extensions. |
131 | | - * @version 6.8.0 |
| 131 | + * @version 6.8.1 |
132 | 132 | * @author Nicola Asuni - [email protected] |
133 | 133 | * @IgnoreAnnotation("protected") |
134 | 134 | * @IgnoreAnnotation("public") |
@@ -24467,6 +24467,10 @@ protected function startSVGElementHandler($parser, $name, $attribs, $ctm=array() |
24467 | 24467 | $img = '@'.base64_decode(substr($img, strlen($m[0]))); |
24468 | 24468 | } else { |
24469 | 24469 | // fix image path |
| 24470 | + if (strpos($img, '../') !== false) { |
| 24471 | + // accessing parent folders is not allowed |
| 24472 | + break; |
| 24473 | + } |
24470 | 24474 | if (!TCPDF_STATIC::empty_string($this->svgdir) AND (($img[0] == '.') OR (basename($img) == $img))) { |
24471 | 24475 | // replace relative path with full server path |
24472 | 24476 | $img = $this->svgdir.'/'.$img; |
|
0 commit comments