Skip to content

Invalidate sessions on password reset - #189

Open
B58TU wants to merge 1 commit into
crackmesone:mainfrom
B58TU:fix/invalidate-sessions-on-password-reset
Open

B58TU wants to merge 1 commit into
crackmesone:mainfrom
B58TU:fix/invalidate-sessions-on-password-reset

Conversation

@B58TU

@B58TU B58TU commented Sep 23, 2026

Copy link
Copy Markdown

Summary

  • Password reset (and password change) now bumps a per-user session_version.
  • Existing signed cookie sessions that don't match are cleared on the next request, so a stolen session can't survive a reset.
  • Logged-in password change keeps the current browser session alive by refreshing its version.

Test plan

  • pytest tests/test_password_reset.py (includes new regression for session invalidation)
  • Related auth/model suites ( est_routes, est_models_extended, est_controller_edge_cases, est_services_extended) — 67 passed
  • Manually: log in two browsers, reset password via forgot-password in one, confirm the other is logged out

Cookie sessions only stored name/email, so a stolen session survived
password reset. Bump a per-user session_version on password change and
drop cookies that don't match on each request.
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.

1 participant