aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel GarcĂ­a <[email protected]>2023-03-27 09:32:25 +0200
committerGitHub <[email protected]>2023-03-27 09:32:25 +0200
commit525e6bb65a6926e0f9de3fc5dafd5c5b63981f9f (patch)
tree7ce12210d57e616cc3593f23156f13e88a6b76af
parent3646f14042337290ee3b8f661cc058cb69f52ce1 (diff)
parent62cebebd3d3f7d51d2a38afd36c4aa12a8bd088b (diff)
downloadvaultwarden-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.rs2
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((