SessionRotate(): Do you always use this after a su...
# cfml-general
r
SessionRotate(): Do you always use this after a successful sign on? Docs say it helps to prevent hacking.
d
We use Use J2EE session variables, so it doesn't apply.
b
Yes, this is generally a good idea, since it will create a new session token, after authentication. By not refreshing the session, this may make it easier for an attacker to obtain a "will-be-valid-in-the-future" session token
1
r
I have this in testing now, but so far it looks like it will work to solve the problem we are having with duplicated sessions.
f
it is a good idea for avoiding session fixation attacks
b
And the other side of this is to always have the "logout" action destroy/invalidate the session on the server-side, not just clear the cookies in the client's browser
👍 1
l
@Dave Merrill JEE sessions can also be rotated, though it takes some coding. We do so on Lucee.
👍 1
c
@foundeo is the JEE session rotating code in that 2014 blog post still a safe-to-use approach?
f
yeah, still the only way to do it as far as I know
👍 2
z
what @micha and i discussed a while back was potentially storing cookie headers in an intermediary array/struct in the pageContext, so they can also be cleared/edited (before a flush has occurred)
👍 1