Repository navigation
Refuse every OIDC login of a disabled user, not only the first - #1483
Merged
tomchop merged 1 commit intoNov 19, 2026
Merged
Conversation
oidc_callback answered 401 "User account disabled" only in the branch that creates the user on a first login. A later login of the same, still disabled user, or of a user an admin had disabled, fell through and got a yeti_session cookie. The cookie reached /auth/me only, since the routers require an enabled user. The callback now checks enabled before issuing the session and answers the same 401. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
tomchop
approved these changes
Nov 19, 2026
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.
Fixes #1479.
oidc_callbackanswered 401 "User account disabled" only in the branch that creates the user on a first login. A later login of the same, still disabled user fell through and got ayeti_sessioncookie. So did a user an admin had disabled.The callback now checks
enabledbefore issuing the session and answers the same 401. Password login, the API key exchange and the ID-token exchange already refuse a disabled user.Tests:
test_disabled_user_gets_no_sessioninOIDCLoginTestlogs the same unknown address in twice. Both answers are 401 with the message and no cookie, and the user stays disabled. On the unchanged code the second login answers 307.Checks: ruff, ty and the three test directories in a CI-equivalent environment.
🤖 Generated with Claude Code