aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathijs van Veluw <[email protected]>2024-11-11 11:50:33 +0100
committerGitHub <[email protected]>2024-11-11 11:50:33 +0100
commitd0581da63858885937205ab7e2d1233d4b56c623 (patch)
tree190b1b11820eb60c45cd8c92322d25b7f413147d
parent38aad4f7bedfb4279ecb385e036b1d84f3d59483 (diff)
downloadvaultwarden-d0581da63858885937205ab7e2d1233d4b56c623.tar.gz
vaultwarden-d0581da63858885937205ab7e2d1233d4b56c623.zip
Fix if logic error (#5171)
Fixing a logical error in an if statement where we used `&&` which should have been `||`. Signed-off-by: BlackDex <[email protected]>
-rw-r--r--src/api/core/accounts.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs
index 71609b37..e715d8bd 100644
--- a/src/api/core/accounts.rs
+++ b/src/api/core/accounts.rs
@@ -1231,8 +1231,8 @@ async fn get_auth_request_response(
};
if auth_request.device_type != client_headers.device_type
- && auth_request.request_ip != client_headers.ip.ip.to_string()
- && !auth_request.check_access_code(code)
+ || auth_request.request_ip != client_headers.ip.ip.to_string()
+ || !auth_request.check_access_code(code)
{
err!("AuthRequest doesn't exist", "Invalid device, IP or code")
}