Skip to main content
Participant
September 10, 2009
Question

cookie validation failure

  • September 10, 2009
  • 1 reply
  • 476 views

We have a CF script that fails to authenticate cookie. Checked in the browser that the cookie is trying to valid and is present.

Any idea what's missing?

TIA.

Code...

<cfinclude template="2APP_Constants.cfm">

<cfoutput>
<cfif NOT(ListContainsNoCase(cgi.http_cookie, "APP2Validation","; "))>
  <html>
    <head>
      <script language="JavaScript">
        <!--
        setTimeout("top.location.href = '#strHome#'",10000);
        //-->
      </script>
    </head>
    <body>
      <div align="center">
        <h1>ERROR: Session could not be authenticated.</h1>
        <p />You will be redirected to the home page in 10 seconds.  <a href="#strHome#">Click here to redirect immediately.</a>
      </div>
    </body>
  </html>
  <cfabort>
</cfif>
</cfoutput>

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    September 10, 2009
    <cfif NOT(ListContainsNoCase(cgi.http_cookie, "APP2Validation","; "))>

    If the name of the cookie is APP2Validation, then you should instead do:

    <cfif NOT isDefined("cookie.APP2Validation")>