Renews the session when started. For example, you want to generate a new session after a successful login. It prevents session attacks, because the session before and after a successful authentication is different.The method,
| Note: Does not rotate jsessionid when JEE sessions are enabled. This only works with ColdFusion sessions (CFID, CFTOKEN). |
None
Display and formatting functions
SessionRotate()
ColdFusion 10: Added this function.
None
Use this function to rotate the session.
Application.cfc
<cfcomponent> |
sessionRotate.cfm
| <cfif isDefined("url.rotate") > <cfset sessionRotate()/> </cfif> <cfif isDefined("url.name") > <cfset session.name = url.name /> </cfif> <cfdump var="#session#" label="SESSION"> <cfoutput> <a href="sessionRotate.cfm?name=BOB">Set session.name = BOB </a> <br/> <a href="sessionRotate.cfm?rotate=TRUE">Rotate the session</a> </cfoutput> |
Sign in to your account