case-insensitive charset name in xml scanner
This commit is contained in:
parent
6ab969e9cc
commit
d4eab49815
|
@ -100,7 +100,7 @@ class XmlScanner
|
|||
$xml = mb_convert_encoding($xml, 'UTF-8', $charset);
|
||||
|
||||
$result = preg_match($pattern, $xml, $matches);
|
||||
$charset = $result ? $matches[1] : 'UTF-8';
|
||||
$charset = strtoupper($result ? $matches[1] : 'UTF-8');
|
||||
if ($charset !== 'UTF-8') {
|
||||
throw new Reader\Exception('Suspicious Double-encoded XML, spreadsheet file load() aborted to prevent XXE/XEE attacks');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue