Skip to content

Fix what the fourth security audit confirmed - #88

Merged
entity merged 9 commits into
mainfrom
fix/fourth-audit-findings
Nov 11, 2026
Merged

entity merged 9 commits into
mainfrom
fix/fourth-audit-findings

Conversation

@entity

@entity entity commented Nov 11, 2026

Copy link
Copy Markdown
Owner

A full audit of 725939d confirmed 21 issues, one medium and twenty low. This fixes all of them, each with a regression test, and hardens the code behind the two it left open.

The medium one: a sign-in method saved by a request already under way while an email change is being undone could survive the undo, and still sign in afterwards. An undo now looks again once it has ended the sessions, and saving a sign-in method or asking for an email change re-checks its session under the lock a sign-out takes.

Changes in behaviour, also in UPGRADE.md:

  • keyring_sessions has a user_type column, so two user models with the same IDs no longer share sessions.
  • timebox defaults to 500ms, up from 250ms, and now covers refused password resets. A refusal that outruns it is logged.
  • Saving the current password as the new one is refused, so a password hold can't be lifted that way.
  • A sign-in name that was refused stays refused after the account's limits are cleared, to anyone without the password.
  • With sessions.end_on_lapse, a mid-session risk step-up signs the session out.
  • A sign in that fails after the guard is signed in leaves nobody signed in.

All five CI jobs passed locally with bin/ci, including 17 two-process race tests on PostgreSQL and MySQL.

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