mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[PR #985] [MERGED] fix(oidc): strip trailing slash from issuer URL before building discovery URL #1146
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#1146
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/985
Author: @netscout2001
Created: 4/15/2026
Status: ✅ Merged
Merged: 4/15/2026
Merged by: @maziggy
Base:
dev← Head:feature/2fa-oidc-authentication📝 Commits (3)
058a7bbfix(oidc): strip trailing slash from issuer_url before building discovery URLba088bbtest(oidc): add regression test for trailing slash in issuer URL4df6905Merge branch 'dev' into feature/2fa-oidc-authentication📊 Changes
2 files changed (+67 additions, -2 deletions)
View changed files
📝
backend/app/api/routes/mfa.py(+2 -2)📝
backend/tests/integration/test_mfa_api.py(+65 -0)📄 Description
Authentik and similar OIDC providers return issuer URLs with a trailing slash
(e.g.
<https://authentik.example.com/application/o/bambuddy/>). BamBuddyappended
/.well-known/openid-configurationdirectly, producing a doubleslash and a failed discovery fetch ("Failed to fetch OIDC discovery document").
Fix:
issuer_url.rstrip('/')in both discovery URL construction sites inoidc_authorizeandoidc_callback. No effect when the URL has no trailingslash.
Includes a regression test that verifies the correct discovery URL is
requested when the configured issuer URL has a trailing slash.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.