fix(users): a password reset signs out every session begun with the old password (#5427)
#5427 "A password reset doesn't end the sessions already signed in with the old password": users.sessions_since (migration 0038) is set on reset; refresh_session_user ends a session whose login_at is earlier. An admin resetting their own password carries on signed in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -44,3 +44,6 @@ class User(Base):
|
||||
# 495). None follows its role's default (notify.<kind>.<role> in settings).
|
||||
notify_alerts: Mapped[bool | None] = mapped_column(Boolean, nullable=True)
|
||||
notify_report: Mapped[bool | None] = mapped_column(Boolean, nullable=True)
|
||||
# Sessions that began before this are over (#5427): set when the password
|
||||
# is reset, so a browser signed in with the old password is signed out.
|
||||
sessions_since: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
|
||||
|
||||
Reference in New Issue
Block a user