diff options
author | Christian Heimes <christian@python.org> | 2013-02-25 00:49:17 +0100 |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2013-02-25 00:49:17 +0100 |
commit | f0e0a6fec15339cff113497fe65fe7ec11691c76 (patch) | |
tree | 4f8ad7a878647171e36cf57ff8ec0fbc260ec4cc | |
parent | 2d313278fbf41bc8758611efe0a4ef047e87c3be (diff) | |
download | defusedxml-git-f0e0a6fec15339cff113497fe65fe7ec11691c76.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); |