Skip to content

Commit

Permalink
fix(auth): fix password with colons (#3402)
Browse files Browse the repository at this point in the history
Fix #3401

---------

Co-authored-by: Taiming Liu <90490946+taimingl@users.noreply.github.com>
  • Loading branch information
gaetan-craft and taimingl committed May 3, 2024
1 parent 32346e8 commit 360e137
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handler/http/auth/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 360e137

Please sign in to comment.