Skip to content

Guard org join and create login views against already-used invitations - #255

Merged
norkans7 merged 2 commits into
mainfrom
join-flow-guards
Jul 27, 2026
Merged

Guard org join and create login views against already-used invitations#255
norkans7 merged 2 commits into
mainfrom
join-flow-guards

Conversation

@norkans7

Copy link
Copy Markdown
Contributor

On a double submit, the create-login view created and logged in the new user before re-fetching the invitation; with the invitation already consumed this raised an AttributeError → 500, leaving an orphaned logged-in user belonging to no org. The join view had the same None dereference.

Both views now validate the invitation first and redirect with the existing invalid/expired-invitation message before any user is created or membership mutated. Tests cover the double-submit race directly.

@norkans7
norkans7 merged commit 01ca956 into main Jul 27, 2026
14 checks passed
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