diff options
author | Daniel GarcĂa <[email protected]> | 2023-03-27 09:32:25 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-03-27 09:32:25 +0200 |
commit | 525e6bb65a6926e0f9de3fc5dafd5c5b63981f9f (patch) | |
tree | 7ce12210d57e616cc3593f23156f13e88a6b76af | |
parent | 3646f14042337290ee3b8f661cc058cb69f52ce1 (diff) | |
parent | 62cebebd3d3f7d51d2a38afd36c4aa12a8bd088b (diff) | |
download | vaultwarden-525e6bb65a6926e0f9de3fc5dafd5c5b63981f9f.tar.gz vaultwarden-525e6bb65a6926e0f9de3fc5dafd5c5b63981f9f.zip |
Merge pull request #3376 from jjlin/knowndevices-nopad
Decode knowndevice `X-Request-Email` as base64url with no padding
-rw-r--r-- | src/api/core/accounts.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index 7cc18474..332fda77 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -899,7 +899,7 @@ impl<'r> FromRequest<'r> for KnownDevice { async fn from_request(req: &'r Request<'_>) -> Outcome<Self, Self::Error> { let email = if let Some(email_b64) = req.headers().get_one("X-Request-Email") { - let email_bytes = match data_encoding::BASE64URL.decode(email_b64.as_bytes()) { + let email_bytes = match data_encoding::BASE64URL_NOPAD.decode(email_b64.as_bytes()) { Ok(bytes) => bytes, Err(_) => { return Outcome::Failure(( |