Skip to content

fix: skip OIDC state check only if not required - #596

Merged
emrberk merged 4 commits into
mainfrom
fix/oidc-state-check
Aug 13, 2026
Merged

fix: skip OIDC state check only if not required#596
emrberk merged 4 commits into
mainfrom
fix/oidc-state-check

Conversation

@emrberk

@emrberk emrberk commented Aug 13, 2026

Copy link
Copy Markdown
Member

setupOAuth2 compared the state parameter only when a state value already sat in localStorage. With none stored, it skipped the check and exchanged the code anyway. A browser that never started a login accepted any ?code= sent to it.

The check now runs whenever the server sets acl.oidc.state.required, and a missing or mismatched state ends in logout({ promptForLogin: true }). OAUTH_STATE is also cleared on every path, not only inside the old branch.

glasstiger
glasstiger previously approved these changes Aug 13, 2026
glasstiger
glasstiger previously approved these changes Aug 13, 2026
@emrberk
emrberk merged commit 5b3d4d1 into main Aug 13, 2026
4 checks passed
@emrberk
emrberk deleted the fix/oidc-state-check branch August 13, 2026 18:06
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.

2 participants