Skip to content

[6.x] Fix session-expiry modals being dismissible and silently re-extending sessions - #15020

Merged
jasonvarga merged 2 commits into
6.xfrom
session-expiry
Jul 16, 2026
Merged

[6.x] Fix session-expiry modals being dismissible and silently re-extending sessions#15020
jasonvarga merged 2 commits into
6.xfrom
session-expiry

Conversation

@jasonvarga

@jasonvarga jasonvarga commented Jul 16, 2026

Copy link
Copy Markdown
Member

Fixes #12484.

Two related problems with the CP's session-expiry flow:

The session-expiry and resume-session modals could be dismissed by accident. Both the resume-session and two-factor modals were passed :dismissable="false" instead of the correct :dismissible="false", so the typo'd prop did nothing and clicking the overlay or pressing Esc would silently close them, leaving no way to bring them back. Both now require an explicit Cancel action, which shows a banner that reopens the relevant modal when clicked.

An expired session could silently renew itself. When the countdown hit zero, SessionExpiry.vue fetched a fresh CSRF token before showing the resume-session login form. That request went through the CP's session middleware like any other, which touches last_activity and resets the idle timer — so the very act of preparing the "please log back in" prompt re-extended the session it was about to warn about. The next poll would then report a nearly-full session, and the modal would vanish without the user ever re-authenticating.

StartSession already excluded the session-timeout polling route from extending the session; this excludes the CSRF token route the same way.

Fetching a fresh CSRF token for the session-expiry login form touched
the session's last_activity, resetting the idle timer and making an
expired session look active again. Excludes the token route from
extending the session, the same way the session-timeout polling route
already was.

Fixes #12484
The warning and resume-session modals could be closed by clicking the
overlay or pressing Esc (the resume-session and two-factor modals had
a typo, :dismissable instead of :dismissible, so it was never actually
applied), leaving no clear way to get back to them.

Both modals now require an explicit Cancel action to close. Cancelling
either one shows a banner explaining the session is expiring/expired,
which reopens the relevant modal when clicked.
@jasonvarga
jasonvarga merged commit 057945c into 6.x Jul 16, 2026
24 checks passed
@jasonvarga
jasonvarga deleted the session-expiry branch July 16, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session timeout expiry does not always expire the session

1 participant