Created
August 16, 2023 07:07
-
-
Save trycf/5d7b04650ca62be724138dcc83d3e278 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
//trycf has lucee.xmlfeatures.override.disable=true set | |
str= '<?xml version="1.0" encoding="ISO-8859-1"?> | |
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> | |
<hibernate-mapping></hibernate-mapping>'; | |
dump(isXml(str)); // only returns boolean | |
dump(isXml(str, { | |
"secure": true, | |
"disallowDoctypeDecl": true, | |
"externalGeneralEntities": false | |
})); // xmlfeatures override ignored | |
flush; | |
try { | |
dump( xmlParse( str, false, { | |
"secure": true, | |
"disallowDoctypeDecl": true, | |
"externalGeneralEntities": false | |
})); // xmlfeatures override ignored | |
} catch(e){ | |
echo(e); | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment