Repository navigation
[IMPROVEMENT] Auth: Ensure proper session rotation / Impl. `SessionUp… - #12312
Merged
thojou merged 1 commit intoOct 28, 2026
Merged
Conversation
mjansenDatabay
force-pushed
the
hotix/trunk/session-rotation
branch
2 times, most recently
from
October 28, 2026 14:09
81abb99 to
8a81e03
Compare
…dateTimestampHandlerInterface`
mjansenDatabay
force-pushed
the
hotix/trunk/session-rotation
branch
from
October 28, 2026 14:40
8a81e03 to
9bbd673
Compare
thojou
approved these changes
Oct 28, 2026
thojou
left a comment
Contributor
There was a problem hiding this comment.
Hey @mjansenDatabay,
Thanks for the PR.
As we already discussed the details via chat, I'll go ahead and merge this PR now.
I've reviewed and tested the changes – it looks good to me!
Kind regards,
@thojou
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…dateTimestampHandlerInterface`
Session ids are now rotated only at the points where the authenticated account changes.
onLoginSuccess()andonSessionExpired()rotate the id.logout()drops the previous$_SESSIONpayload, destroys the session, and starts a new anonymous one.ensureAnonymousContext()keeps the current id for the login page and clears the payload only when leaving a logged-in account.usr_sessionrow is replaced at bootstrap. A registered cookie session is resumed unchanged.doStandardAuthenticationis no longer a safe POST command, so the login POST requires anrtoken(CSRF) after the ctrl-security artifact is rebuilt.ilSessionDBHandlerimplementsSessionUpdateTimestampHandlerInterface. An unchanged session extends its idle deadline without rewriting the stored payload.Improvement-Request: https://mantis.ilias.de/view.php?id=24216