From d0581da63858885937205ab7e2d1233d4b56c623 Mon Sep 17 00:00:00 2001 From: Mathijs van Veluw Date: Mon, 11 Nov 2024 11:50:33 +0100 Subject: [PATCH] Fix if logic error (#5171) Fixing a logical error in an if statement where we used `&&` which should have been `||`. Signed-off-by: BlackDex --- src/api/core/accounts.rs | 4 ++-- 1 file 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") }