PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 All 45 releases
← All changes | libraries/vendor/PhpSpreadsheet/Reader/Security/XmlScanner.php +5 -0 3.3.1 → 3.4 View file →
@@ -124,8 +124,13 @@
124 124 if ($foundUtf7) {
125 125 throw new Reader\Exception('UTF-7 encoding not permitted');
126 126 }
127 127 if (substr($xml, 0, Reader\Csv::UTF8_BOM_LEN) === Reader\Csv::UTF8_BOM) {
128 + if (preg_match(self::ENCODING_PATTERN, $xml, $matches) === 1) {
129 + if (strtolower($matches[2]) !== 'utf-8') {
130 + throw new Reader\Exception("BOM says UTF-8 but encoding says {$matches[2]}");
131 + }
132 + }
128 133 $xml = (string) substr($xml, Reader\Csv::UTF8_BOM_LEN);
129 134 }
130 135
131 136 return $xml;