Posted in ColdFusion | Posted on 01-05-2007 | 7,062 views
I've gotten this question many times so I thought I'd write up a quick FAQ. If you are displaying dynamic content on your ColdFusion site and see InvalidTag instead of the HTML you thought you would - it means one of two things.
Either your ColdFusion Admin has Enable Global Script Protection turned on or your Application has scriptProtect set to true. This would be set in either the CFAPPLICATION tag or the This scope of your Application.cfc file.
This is a feature that helps prevent cross-site scripting attacks. Personally I don't use this feature as I always htmlEditFormat user input before displaying it. For more information about this feature, see this page from the LiveDocs:
So - raise your hand if you've seen this and had no idea what it was!


<code>
<var name="CrossSiteScriptPatterns">
<struct type="coldfusion.server.ConfigMap">
<var name="<\s*(object|embed|script|applet|meta)">
<string><InvalidTag</string>
</var>
</struct>
</var>
</code>
http://secunia.com/advisories/23281/
"64586 Hot fix to resolve a possible cross-site scripting (XSS) vulnerability in ColdFusion's handling of forms."
http://www.adobe.com/cfusion/knowledgebase/index.c...
Thanks for the post, I've been having this issue on my codeShare site (http://codeshare.everfro.com, shameless plug). When users submit code with JS in it the script tag gets replaced with InvalidTag. Hopefully this will help me with my issue.
Ryan
Unfortunately I think you are out of luck. I'd change hosts.
<a href="http://www.beetrootstreet.com/blog/index.cfm/2008/...;
It basically uses onRequestEnd.cfm to re-write the SCRIPT tags. It can also be adapted to work in an Application.cfc environment.
Hope it helps.
Martin
http://www.beetrootstreet.com/blog/index.cfm/2008/...
Martin
<cfapplication name="#prefix#_blog_#blogname#" sessionManagement="true" loginStorage="session" scriptprotect="none">
I've run into the same issue that Russ did. Going to do some further testing, but with global script protect on the override in the cfapplication doesn't seem to get picked up or its not allowed. A little odd. I believe blogCFC comes out of the box that way. I've cleared the template cache just to be sure but the issue persists.
I have the same problem with this page http://www.4sixsix.nl/page.cfm/Filmpjes
See the source of this page. I have put scriptprotect="false" in the application file but nothing happen.
I have e-mail the support desk of hostek.com to see if there is something changed on the server.
This happend after an update of this page last week. Before that the youtube movies are show correct on the page ?
Depending on your version, the string "False" may NOT equivalent to the boolean operator False. The string "No", however, IS equivalent.
Trying writing:
scriptProtect = false
OR:
scriptProtect = "No"
Do not write:
scriptProtect = "false"
That might solve some of the problems for some of the people out there.
[Add Comment] [Subscribe to Comments]