Files
PhpSpreadsheet/tests/data/Reader/Xml/XEETestValidUTF-8-single-quote.xml
Adrien Crivelli bea2d4b30f Security: prevent XXE (XML External Entity) when loading files
Prevent XEE by hiding custom entities by using single quote to
declare a non-UTF-8 encoding.

XML standard, https://www.w3.org/TR/xml/#NT-EncodingDecl, allows single
quote to declare encoding, but we did not support it. Instead, we
incorrectly fell back on the default of UTF-8. That incorrectly kept the
XML as non-UTF-8, and thus prevented our regexp-based custom entity
detection mechanism to work.
2024-07-29 16:22:43 +09:00

5 lines
84 B
XML

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<root>
test: Valid
</root>