aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathijs van Veluw <[email protected]>2024-08-15 12:29:51 +0200
committerGitHub <[email protected]>2024-08-15 12:29:51 +0200
commit339612c917ce6e47ac79359c711e42ee18833123 (patch)
treee94a11cff98da7df46191a3e8a698c0894f94558 /src
parent9eebbf3b9f6ad6002353014148057049976be3d1 (diff)
downloadvaultwarden-339612c917ce6e47ac79359c711e42ee18833123.tar.gz
vaultwarden-339612c917ce6e47ac79359c711e42ee18833123.zip
Fix Duo Redirect not using path (#4862)
The URL crate treats `https://domain.tld/path` differently then `https://domain.tld/path/` the latter will make sure a `.join()` will append the given path instead of using the base as a relative path. Fixes #4858
Diffstat (limited to 'src')
-rw-r--r--src/api/core/two_factor/duo_oidc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/core/two_factor/duo_oidc.rs b/src/api/core/two_factor/duo_oidc.rs
index 9b7e7f12..d252df91 100644
--- a/src/api/core/two_factor/duo_oidc.rs
+++ b/src/api/core/two_factor/duo_oidc.rs
@@ -357,7 +357,7 @@ pub async fn purge_duo_contexts(pool: DbPool) {
// Construct the url that Duo should redirect users to.
fn make_callback_url(client_name: &str) -> Result<String, Error> {
// Get the location of this application as defined in the config.
- let base = match Url::parse(CONFIG.domain().as_str()) {
+ let base = match Url::parse(&format!("{}/", CONFIG.domain())) {
Ok(url) => url,
Err(e) => err!(format!("Error parsing configured domain URL (check your domain configuration): {e:?}")),
};