Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 09/26/2015
Components: Language
Versions: 11.0
Failure Type: Usability Issue
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Normal / Most users will encounter
Locale/System: ALL / Platforms All
Vote Count: 5
Repro:
<cfscript>
raw = repeatString("x",5001);
clean = getSafeHtml(raw);
writeDump(variables);
</cfscript>
Expected:
it to work
Actual:
Error validating html input.
coldfusion.security.ESAPIUtils$HTMLValidationException: Error validating html input.
at coldfusion.security.ESAPIUtils.getSafeHTML(ESAPIUtils.java:693)
at coldfusion.runtime.CFPage.GetSafeHTML(CFPage.java:10984)
at cfgetCleanHtml2ecfm926324941.runPage(D:\temp\getCleanHtml.cfm:3)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:250)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:736)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572)
at coldfusion.tools.CLI.compileAndRun(CLI.java:314)
at coldfusion.tools.CLI.main(CLI.java:189)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at coldfusion.tools.CLIInvoker.main(CLIInvoker.java:142)
Caused by: org.owasp.validator.html.ScanException: The input was too large. The specified input was 5,001 bytes and the maximum is 5,000 bytes.
This is controlled by cfusion/lib/antisamy-basic.xml, but 5000 chars is a stupidly low restrict here. Does it need to have a restriction at all? If I comment out that line, there seems to be a ceiling of 100000, which is still a bit light, but I imagine it's a restriction of the library you're using.
At a minimum you need to document this stupidly low threshold you've set, and how to remove it. But you should also do the same with CF itself: remove the restriction.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4064602
External Customer Info:
External Company:
External Customer Name: Adam Cameron
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: