Skip to content

Commit

Permalink
Fix if logic error (dani-garcia#5171)
Browse files Browse the repository at this point in the history
Fixing a logical error in an if statement where we used `&&` which should have been `||`.

Signed-off-by: BlackDex <black.dex@gmail.com>
  • Loading branch information
BlackDex authored Nov 11, 2024
1 parent 38aad4f commit d0581da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/core/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit d0581da

Please sign in to comment.