Ive got a bit of a problem these identifiers.
I'm basically using session variables but without setting client cookies and also encoding the querystring and re-encoding this on the receiving page.
These are the steps:
1. attach cfid & cftoken vars to the querystring
2. encode the querystring and pass to the next page
3. re-encode the querystring and loop through the url vars and set them to the url scope
4 then (obviously checking if they exist) set the session identifiers (cfid, cftoken, urltoken) with the values found in the querystring
Now everything works how it should but whenever i set a custom session var like 'loggedin' or something, this seems to get removed from the session. So currently i have a login form, the form is posted logic done to check the u & p - then a session var set if successful. Now as soon as that page is refreshed or any other, that variable doesn't exist anymore, even if the identifiers (cfid, cftoken, urltoken) are the same.
Whats up here?
I can post code if necc. but heres the function that converts the encrypted querystring vars to url and session vars.
<cffunction name="keyValuePairToUrlSco
pe" output="yes" returntype="void" access="private">
<cfargument name="keyValuePairList" default="" required="yes" type="string" />
<cfargument name="delimiter" default="&" required="no" type="string" />
<cfscript>
var key = "";
var value = "";
</cfscript>
<cfloop list="#arguments.keyValueP
airList#" index="keyValuePair" delimiters="#arguments.del
imiter#">
<cfscript>
if(keyValuePair contains "=" and len(keyValuePair) gt 2){
key = listGetAt(keyValuePair,1,"
=");
value = listGetAt(keyValuePair,2,"
=");
}
url[key] = value;
</cfscript>
</cfloop>
<cfscript>
// we now have to populate the session scope with vars
if(structKeyExists(url,"cf
id")) session.cfid = url.cfid;
if(structKeyExists(url,"cf
token")) session.cftoken = url.cftoken;
session.sessionId = "APPNAME_#session.cfid#_#s
ession.cft
oken#";
session.urlToken = "CFID=#session.cfid#&CFTOK
EN=#sessio
n.cftoken#
";
</cfscript>
<cfdump var="#session#">
</cffunction>