alholden
01/24/2025, 2:09 AMthis.Name
and this.ApplicationTimeout
stuff.
Yes, restarted the service for each one of these:
⢠<cfset this.authcookie = {samesite = 'Strict'} />
⢠<cfset authcookie = {samesite = 'Strict'} />
⢠<cfset this.authcookie.samesite = 'Strict' />
⢠<cfset authcookie.samesite = 'Strict' />
Also, this documentation confused me a little bit. Should this be "Strict"??:Erin Brewer
01/24/2025, 2:14 AM{samesite:'Strict'}
alholden
01/24/2025, 2:28 AMErin Brewer
01/24/2025, 2:36 AMErin Brewer
01/24/2025, 2:37 AMalholden
01/24/2025, 3:32 AMalholden
01/24/2025, 3:37 AM<cfset this.authcookie = {samesite:'Strict'} />
Erin Brewer
01/24/2025, 3:37 AM<cfscript>
// Set CFID cookie
cookie.CFID = GetCookie("CFID"); // Retrieve the existing value if set
SetCookie(
name="CFID",
value=cookie.CFID,
httponly=true,
secure=true,
samesite="Strict"
);
// Set CFTOKEN cookie
cookie.CFTOKEN = GetCookie("CFTOKEN"); // Retrieve the existing value if set
SetCookie(
name="CFTOKEN",
value=cookie.CFTOKEN,
httponly=true,
secure=true,
samesite="Strict"
);
</cfscript>
Erin Brewer
01/24/2025, 3:38 AMalholden
01/24/2025, 3:38 AMErin Brewer
01/24/2025, 3:39 AMalholden
01/24/2025, 3:40 AMErin Brewer
01/24/2025, 3:41 AMaliaspooryorik
cflogin
?aliaspooryorik
this.sessioncookie.samesite
for cfid
and cftoken
cookiesaliaspooryorik
aliaspooryorik
aliaspooryorik
BK BK
01/26/2025, 5:38 PM<!--- CFAuthorization cookie: this.authcookie is a struct with possible keys currently 'disableUpdate', 'timeout', 'samesite' --->
<cfset theAppAuthCookie=structNew()>
<cfset theAppAuthCookie.samesite="strict"> <!--- Options: Strict, Lax or None --->
<cfset this.authCookie=theAppAuthCookie>
<!--- Session cookie: this.sessioncookie is a struct with possible keys currently 'disableUpdate', 'timeout', 'httponly', 'secure', 'domain', 'samesite' --->
<cfset theAppSessionCookie=structNew()>
<cfset theAppSessionCookie.timeout=createTimeSpan(0, 1, 0, 0)>
<cfset theAppSessionCookie.samesite="strict"> <!--- Options: Strict, Lax or None --->
<cfset this.sessionCookie=theAppSessionCookie>
(2) Equivalently, in Application.cfm:
<!--- Authorization cookie --->
<cfset theAppAuthCookie = {samesite='strict'}> <!--- Options: Strict, Lax or None --->
<!--- Session cookie --->
<cfset theAppSessionCookie.httponly=true>
<cfset theAppSessionCookie.timeout=createTimeSpan(0, 1, 0, 0)>
<cfset theAppSessionCookie.samesite="strict"> <!--- Options: Strict, Lax or None --->
<cfapplication
name="theApp"
sessionManagement="yes"
authCookie=theAppAuthCookie
sessionCookie=theAppSessionCookie>
(3) Cookie's samesite attribute to instruct the browser on how to handle a cookie in first-party or third-party situations:
<cfcookie name="cookieName" samesite="strict"> <!--- Samesite options: Strict, Lax or None --->
(4) Implement samesite as CookieProcessor attribute in Adobe ColdFusion's context.xml configuration file:
<Context>
<!-- Either the sameSiteCookies attribute is not set, or else it is set with value none, lax or strict -->
<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" sameSiteCookies="strict"/>
</Context>
This makes use of an implementation of Tomcat's Legacy Cookie Processor.aliaspooryorik
BK BK
01/27/2025, 9:14 AM@aliaspooryorik: Are people still using Application.cfm?
You will be surprised. šaliaspooryorik
Erin Brewer
01/27/2025, 4:03 PMaliaspooryorik
aliaspooryorik