<cfset application.Portcullis.scan(url,"url",cgi.remote_addr)>
<cfset application.Portcullis.scan(form,"form",cgi.remote_addr)>
<cfset application.Portcullis.scan(cookie,"cookie",cgi.remote_addr)>
<cffunction name="scan" output="false" access="public" returntype="Void">
<cfargument name="object" required="true" type="Struct"/>
<cfargument name="objectname" required="true" type="String"/>
<cfargument name="ipAddress" required="true" type="String"/>
<cfargument name="exceptionFields" required="false" type="String"/> <!---Comma delimited list of fields not to scan--->
<cfset var object2 = StructNew()/>
<cfset var result = StructNew()/>
<cfset var item= ""/>
<cfset var itemname= ""/>
<cfset var exFF= variables.instance.exceptionFields/>
<cfset var detected= 0/>
<cfset var temp= StructNew()/>
<cfset var newitem = ""/>
<cfset var contents = ""/>
<cfset var nameregex = "[^a-zA-Z0-9_]"/>
<!---Filter Tags--->
<cfloop collection="#object#" item="item">
<cfif ListContainsNoCase(exFF,item,',') eq false>
<cfset temp = filterTags(object[item])/>
<cfset itemname = REReplaceNoCase(item,nameregex,"","All")>
<cfif temp.detected eq true><cfset detected = detected + 1/></cfif>
<cfif objectname eq "cookie" and variables.instance.allowJSAccessCookies eq false>
<cfheader name="Set-Cookie" value="#itemname#=#temp.cleanText#;HttpOnly">
<cfelse>
<cfset "#objectname#.#itemname#" = temp.cleanText/>
</cfif>
</cfif>
</cfloop>
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/510e4100-8b14-4459-9844-0ad9c3aeb7b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<cfif isdefined("application.Portcullis") eq false>
<cfset application.Portcullis = createObject("component","com.fusionlink.Portcullis").init()/>
</cfif>
--
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
Thanks Nando,Don't think that's the issue but I'll change it as a best practice. (and thanks for taking the time to research this...above & beyond!)
The singleton issue. I'm not really sure about the scope issue. As noted, this worked without issue on ACF for years. Micha's post addresses the difference in usage, but didn't seem to help. :/And I really don't understand why the exception isn't causing any client side issues? I'm not running any kind of error handling for this.
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/0df27c01-f8ac-4532-bb1a-e4113748be4a%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/J9lJoPJJOUk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAGHrs%3D-YGPsZKw2ocDyW2tYcz%2BLskdPZ_ODNYAFdhrv%3DH%2BJkLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jay Bigam
@jayispainting
Edmonton, AB
Mark your calendars!
Solo show: Alberta. Of Earth & Sky.
Milner Gallery, Stanley Milner Public Library
January 2-31, 2016
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CADaxV_p0-gyATkjXjAabjvxk-qOtbMo7YaCs-47cADUMviftEQ%40mail.gmail.com.
<cfif not isstruct(object[item])>
do filterTags func.....
<cfelse>
<cfwddx action="cfml2wddx" input="#object#" output="wddxPacket">
<cflog file="PortcullisErrors" text="#wddxPacket#">
</cfif>
<wddxPacket version='1.0'>
<header/>
<data>
<struct>
<var name='content'>
<string>downloads</string>
</var>
</struct>
</data>
</wddxPacket>
<cfset application.Portcullis.scan(url,"vURL",cgi.remote_addr)>
<cffunction name="scan" output="false" access="public" returntype="Void">
<cfargument name="object" required="true" type="Struct"/>
<cfargument name="objectname" required="true" type="String"/>
<cfargument name="ipAddress" required="true" type="String"/>
<!---Filter Tags--->
<cfloop collection="#arguments.object#" item="item">
<cfif not isstruct(arguments.object[item])>
<cfset temp = filterTags(arguments.object[item])/>
<cfset itemname = REReplaceNoCase(item,nameregex,"","All")>
<cfif temp.detected eq true><cfset detected = detected + 1/></cfif>
<cfif arguments.objectname eq "cookie" and variables.instance.allowJSAccessCookies eq false>
<cfheader name="Set-Cookie" value="#itemname#=#temp.cleanText#;HttpOnly">
<cfelse>
<cfset "#arguments.objectname#.#itemname#" = temp.cleanText/>
</cfif>
<cfelse>
<cfwddx action="cfml2wddx" input="#arguments.object#" output="wddxPacket">
<cflog file="PortcullisErrors" text="#wddxPacket#">
<cflog file="PortcullisErrors" text="#item#">
</cfif>
</cfloop>
<cfloop collection="#arguments.object#" item="item">
<cfif not isstruct(arguments.object[item])>