Skip to content

Commit

Permalink
Update src/Plugins/RpcServer/RpcServer.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon authored Oct 8, 2024
1 parent e7dbb45 commit 1f3483f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Plugins/RpcServer/RpcServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ internal bool CheckAuth(HttpContext context)
byte[] user = auths[..colonIndex];
byte[] pass = auths[(colonIndex + 1)..];

return CryptographicOperations.FixedTimeEquals(user, _rpcUser) && CryptographicOperations.FixedTimeEquals(pass, _rpcPass);
// Execute both checks always but both must be true
return CryptographicOperations.FixedTimeEquals(user, _rpcUser) & CryptographicOperations.FixedTimeEquals(pass, _rpcPass);
}

private static JObject CreateErrorResponse(JToken id, RpcError rpcError)
Expand Down

0 comments on commit 1f3483f

Please sign in to comment.