<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - Clearing Session and/or App variables with Log-out Page?</title>
    <link>https://forums.adobe.com/community/coldfusion/coldfusion_advanced?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Wed, 20 Aug 2014 10:37:07 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2014-08-20T10:37:07Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Clearing Session and/or App variables with Log-out Page?</title>
      <link>https://forums.adobe.com/message/6657321?tstart=0#6657321</link>
      <description>&lt;!-- [DocumentBodyStart:86b46fcd-885d-4016-99b2-65901ba38bd5] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;It in unnecessary to delete session keys to invalidate them. With proper coding they should be invalidated once the session times out.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Sessiontimeout values are usually around half an hour and applicationtimeout values are usually of the order of 1 day. Also, one way to relate session to login is to use the loginStorage attribute. If you have no need for client management, switch it off.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Hence, for example,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfapplication name="appraiseri"&lt;/p&gt;&lt;p&gt;applicationtimeout="#CreateTimeSpan(1,0,0,0)#"&lt;/p&gt;&lt;p&gt;clientmanagement="no"&lt;/p&gt;&lt;p&gt;sessionmanagement="Yes"&lt;/p&gt;&lt;p&gt;sessiontimeout="#CreateTimeSpan(0,0,30,0)#"&lt;/p&gt;&lt;p&gt;SetClientCookies="Yes"&lt;/p&gt;&lt;p&gt;loginStorage="session"&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I am assuming that, for login and logout pages, you will - ignoring the details - have something like&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Login:&lt;/em&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cflogin&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfloginuser name = "some_name" password = "some_password"&amp;nbsp;&amp;nbsp; roles = "appraiser"/&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/cflogin&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Logout:&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cflogout&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:86b46fcd-885d-4016-99b2-65901ba38bd5] --&gt;&lt;img src='/beacon?t=1415919269703' /&gt;</description>
      <pubDate>Wed, 20 Aug 2014 10:32:00 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6657321?tstart=0#6657321</guid>
      <dc:date>2014-08-20T10:32:00Z</dc:date>
      <clearspace:dateToText>2 months 4 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Clearing Session and/or App variables with Log-out Page?</title>
      <link>https://forums.adobe.com/message/6648522?tstart=0#6648522</link>
      <description>&lt;!-- [DocumentBodyStart:a497a391-b488-4786-8cfd-892d2dc62e99] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Greetings&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I have 3 distinct user types for my app- admins, appraisers and clients.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;All have their own directories and each directory has it's own Application.cfm:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;1) &amp;lt;cfapplication name="appraiseri" &lt;/p&gt;&lt;p&gt;applicationtimeout="#CreateTimeSpan(0,2,0,0)#"&lt;/p&gt;&lt;p&gt;clientmanagement="Yes" &lt;/p&gt;&lt;p&gt;sessionmanagement="Yes" &lt;/p&gt;&lt;p&gt;sessiontimeout="#CreateTimeSpan(0,2,0,0)#"&lt;/p&gt;&lt;p&gt;SetClientCookies="Yes"&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;2) &amp;lt;cfapplication name="appraiserview" ......&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;3) &amp;lt;cfapplication name="clientview" .......&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Each have their own login which simply uses their ID in the DB as the session variable.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;login_do.cfm:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;1) Appraisers: &amp;lt;CFIF auth_direct_appraiser.RecordCount NEQ 0 &amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset Session.appraiser_user_id =auth_direct_appraiser.appraiser_ID&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset Session.appraiser_fname =auth_direct_appraiser.appraiser_fname&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset Session.appraiser_lname =auth_direct_appraiser.appraiser_lname&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;2) Admins: &amp;lt;cfset Session.user_id =auth_direct.staff_ID&amp;gt; ......&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;3) Clients: &amp;lt;cfset Session.processor_user_id =auth_direct_processor.processor_ID&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I have had a session persisting for a week now- I have no idea how to get rid of it, and if one simply hits the "login" submit button with no UN or PW, it runs a query on a client (the same one) ?&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;My logout page is not working at all- if the code were correct, it would clear any session variable? I have not really set an app variable (except timeout) so no need to clear that?&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is the code:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;CFLOCK SCOPE="Session" TYPE="Exclusive" TIMEOUT="60"&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CFLOOP COLLECTION="#Session#" ITEM="Key"&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CFIF NOT ListFindNoCase('IveSeenIT', Key)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CFSET StructDelete(Session, Key)&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/CFIF&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/CFLOOP&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/CFLOCK&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;SCRIPT LANGUAGE="JavaScript"&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("You have been logged out from the XXXXX Intranet")&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; location.href='login.cfm';&lt;/p&gt;&lt;p&gt;&amp;lt;/SCRIPT&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any help would be appreciated- this is leaving a huge security gap in the app right now.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:a497a391-b488-4786-8cfd-892d2dc62e99] --&gt;</description>
      <pubDate>Sun, 17 Aug 2014 19:21:54 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6648522?tstart=0#6648522</guid>
      <dc:date>2014-08-17T19:21:54Z</dc:date>
      <clearspace:dateToText>2 months 4 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

