mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[PR #995] [MERGED] fix(oidc): normalise trailing slash in issuer comparison to fix Authentik login #1152
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#1152
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/995
Author: @netscout2001
Created: 4/16/2026
Status: ✅ Merged
Merged: 4/16/2026
Merged by: @maziggy
Base:
dev← Head:feature/2fa-oidc-authentication📝 Commits (2)
03fa718fix(oidc): normalise trailing slash on both sides of issuer comparison763092fMerge branch 'dev' into feature/2fa-oidc-authentication📊 Changes
2 files changed (+127 additions, -6 deletions)
View changed files
📝
backend/app/api/routes/mfa.py(+9 -6)📝
backend/tests/integration/test_mfa_api.py(+118 -0)📄 Description
Follow-up to #985.
Problem
Authentik includes a trailing slash in the JWT
issclaim(
<https://authentik.example.com/application/o/app/>) while the discoverydocument
issuerfield may omit it, or vice-versa. PyJWT's built-in issuervalidation does an exact string comparison, causing
InvalidIssuerErrorandredirecting the user back to the login page with
token_validation_failed.Fix
Disable PyJWT's
issuer=parameter and compare both sides afterrstrip('/')so the check is slash-agnostic.Includes a regression test: provider configured without trailing slash,
JWT
issclaim with trailing slash → login succeeds.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.