• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cookie has a value when it should not

Guest
Sep 25, 2013 Sep 25, 2013

Copy link to clipboard

Copied

I've been working on a bit of bot mitigation and began using checks against Cookie.CFID to verify the client has a value in reply.

I'm using CF  9,0,1,274733

application.cfm includes the following:

<cfapplication sessionManagement="True" clientManagement ="False" setClientCookies="True" sessionTimeout="#CreateTimeSpan(0, 0, 2, 0)#">

I disable cookies in FF 23 browser to simulate a bot and conduct the test.

In my test the check for Cookie.CFID is as expected, empty.  Here is a snippet of code used to test this.

<cftry>

    <cfif REFind("YourIPAddress",CGI.REMOTE_ADDR)>

        <cfif ! IsDefined("Cookie.cfid")>

            <cfoutput>

                No Cookies as expected!

            </cfoutput>

        </cfif>

        <cfdump var="#Cookie#">

    </cfif>

    <cfcatch type="Any">

        <cfdump var="#cfcatch#">

    </cfcatch>

</cftry>

And the result expected from that test:

No Cookies as expected! 

struct [empty]

However, with the same test environment configuration as above in another page I'm getting a non empty struct when dumping cookies like this:

<cfdump var="#Cookie#">

produces:

struct
CFIDSomeId
CFTOKENSomeToken

Is there some function or feature in ColdFusion known to cause this behavior or is this a bug?

Views

200

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation