mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[PR #1024] [MERGED] fix(oidc): raise OIDC callback code/state max_length from 512 to 2048 #1153
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#1153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/maziggy/bambuddy/pull/1024
Author: @netscout2001
Created: 4/18/2026
Status: ✅ Merged
Merged: 4/19/2026
Merged by: @maziggy
Base:
dev← Head:feature/2fa-oidc-authentication📝 Commits (2)
9a2c91dfix(oidc): raise callback code/state max_length from 512 to 2048cca9cacMerge branch 'dev' into feature/2fa-oidc-authentication📊 Changes
2 files changed (+41 additions, -8 deletions)
View changed files
📝
backend/app/api/routes/mfa.py(+2 -2)📝
backend/tests/integration/test_mfa_api.py(+39 -6)📄 Description
Problem
Facebook and some other OAuth providers issue authorization codes that exceed 512 characters. The Pydantic validation on the OIDC callback endpoint (GET /api/v1/auth/oidc/callback) rejected these with a 422 string_too_long error, making login impossible for affected providers.
Fix
Raised max_length for the code and state query parameters from 512 to 2048. The OAuth 2.0 spec (RFC 6749) does not define a maximum authorization code length; 2048 characters aligns with limits used by major providers.
Tests
Three new integration tests in TestOIDCCallbackCodeLength:
512-char code is accepted (regression guard for old limit)
2048-char code is accepted (new limit)
2049-char code is rejected with 422 (upper bound enforced)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.