Skip to content

Commit

Permalink
fix: Correctly check result of function
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>

[skip ci]
  • Loading branch information
nickvergessen authored and backportbot[bot] committed May 15, 2024
1 parent f816957 commit aebb3b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Security/IdentityProof/Signer.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ public function verify(array $data): bool {
$user = $this->userManager->get($userId);
if ($user !== null) {
$key = $this->keyManager->getKey($user);
return (bool)openssl_verify(
return openssl_verify(
json_encode($data['message']),
base64_decode($data['signature']),
$key->getPublic(),
OPENSSL_ALGO_SHA512
);
) === 1;
}
}

Expand Down

0 comments on commit aebb3b5

Please sign in to comment.