Ticket #325 (new defect)
scriptProtect not working
| Reported by: | dubious | Owned by: | scorfield |
|---|---|---|---|
| Type: | defect | Priority: | Normal |
| Milestone: | Fusebox 5.6 | Component: | Miscellaneous |
| Version: | 5.5 | Severity: | normal |
| Keywords: | scriptProtect variable form script embed | Cc: |
Description
CFM 7
Fusebox 5.5
ScriptProtect?="all" (in CF server admin as well as application.cfc)
Problem:
If you refer to a variable as attributes.var the script ptotect will not work. It only works if you refer to the variables as form.var
Input
submitted form input: "<script><embed>"
Output
form.test returns: "<InvalidTag?><InvalidTag?>"
attributes.test returns: "<script><embed>"
Code
index.cfm
<h2>Input</h2>
<form name="test" action="index.cfm" method="post" >
<input type="text" name="test" value="<script><embed>" /><br />
<input type="submit" name="submit" value="submit" />
</form>
<cfif isdefined("form.FIELDNAMES")>
<h2>Results</h2>
<cfoutput>
post.test <input value="#form.test#"/><br />
attributes.test: <input value="#attributes.test#"/>
</cfoutput>
</cfif>
