mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-10 01:10:09 +03:00
[PR #4500] [MERGED] Fix public api for domains with path prefix #2810
Reference in New Issue
Block a user
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/dani-garcia/vaultwarden/pull/4500
Author: @FDHoho007
Created: 4/12/2024
Status: ✅ Merged
Merged: 5/19/2024
Merged by: @dani-garcia
Base:
main← Head:main📝 Commits (1)
e7314ddFix public api for domains with path prefix📊 Changes
1 file changed (+2 additions, -6 deletions)
View changed files
📝
src/api/core/public.rs(+2 -6)📄 Description
Vaultwarden is currently unable to handle the Bitwarden Directory Connector when the base domain includes a path prefix.
Example:
DOMAIN=https://example.com/-> worksDOMAIN=https://example.com/vault/-> doesn't workVaultwarden rejects the token issued seconds before with the error message
"Token not issued by this server".This message is thrown when the token issuer check fails. When a organization api token is issued, the iss attribute follows the scheme
"domain_origin|scope". But when the issuer is checked in api/core/public.rs, the iss attribute is expected to contain"domain|scope".When using a domain with path prefix this leads to conflicts. To fix this I replaced the domain check through a domain_origin check as issued in auth.rs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.