[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

Setting session identifiers (cfid, cftoken, urltoken) manually

Asked by cf_coops in ColdFusion Application Server

Tags: urltoken, cfid, cftoken

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="keyValuePairToUrlScope" 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.keyValuePairList#" index="keyValuePair" delimiters="#arguments.delimiter#">
            <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,"cfid")) session.cfid = url.cfid;
            if(structKeyExists(url,"cftoken")) session.cftoken = url.cftoken;
            session.sessionId = "APPNAME_#session.cfid#_#session.cftoken#";
            session.urlToken = "CFID=#session.cfid#&CFTOKEN=#session.cftoken#";
      </cfscript>
      <cfdump var="#session#">
</cffunction>
 
Related Solutions
Keywords: Setting session identifiers (cfid, cfto…
 
Loading Advertisement...
 
[+][-]10/29/05 08:13 AM, ID: 15185279Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: ColdFusion Application Server
Tags: urltoken, cfid, cftoken
Sign Up Now!
Solution Provided By: ShytKicker
Participating Experts: 2
Solution Grade: A
 
[+][-]10/29/05 07:56 AM, ID: 15185228Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/29/05 08:16 AM, ID: 15185290Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/31/05 04:53 AM, ID: 15192132Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/31/05 07:31 AM, ID: 15193333Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92