diff options
author | Christian Heimes <christian@cheimes.de> | 2013-02-25 00:49:17 +0100 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-02-25 00:49:17 +0100 |
commit | 5d5d869a61dca36d1cf25660d8a29d4bfafdaee6 (patch) | |
tree | 4f8ad7a878647171e36cf57ff8ec0fbc260ec4cc | |
parent | 9bf15a54342356c7cace8815e4e5eb354a710467 (diff) | |
download | defusedxml-5d5d869a61dca36d1cf25660d8a29d4bfafdaee6.tar.gz |
PHP's libxml_disable_entity_loader() prevents entity expansion
-rwxr-xr-x | other/php.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/other/php.php b/other/php.php index e35665b..f1f3a2a 100755 --- a/other/php.php +++ b/other/php.php @@ -5,6 +5,9 @@ // $options = LIBXML_NONET; $options = LIBXML_NOENT; +/* LIBXML_NOENT doesn't have any effect but + libxml_disable_entity_loader(true) works */ + $xml = simplexml_load_file($argv[1], "SimpleXMLElement", $options); $data = (string)$xml; echo strlen($data); |