From 360e13790a7f6958f8ffcfc3156bfaf804bfa2d1 Mon Sep 17 00:00:00 2001 From: gaetan-craft <97035736+gaetan-craft@users.noreply.github.com> Date: Fri, 3 May 2024 15:25:16 +0200 Subject: [PATCH] fix(auth): fix password with colons (#3402) Fix #3401 --------- Co-authored-by: Taiming Liu <90490946+taimingl@users.noreply.github.com> --- src/handler/http/auth/validator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handler/http/auth/validator.rs b/src/handler/http/auth/validator.rs index 0da7657361..d7855dd586 100644 --- a/src/handler/http/auth/validator.rs +++ b/src/handler/http/auth/validator.rs @@ -376,7 +376,7 @@ async fn oo_validator_internal( let credentials = String::from_utf8(decoded.into()) .map_err(|_| ()) .expect("Failed to decode base64 string"); - let parts: Vec<&str> = credentials.split(':').collect(); + let parts: Vec<&str> = credentials.splitn(2, ':').collect(); if parts.len() != 2 { return Err((ErrorUnauthorized("Unauthorized Access"), req)); }