Skip to content

Commit

Permalink
=== changed to hash_equals
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan-DPC committed Sep 20, 2017
1 parent 5c44abf commit 09fd8d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HMacValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected function validate(array $params, $hmac): bool
{
$paramString = http_build_query($params);
$hash = hash_hmac('sha256', $paramString, config('nonce.secret'));
return $hash === $hmac;
return hash_equals($hmac, $hash);

}
}

0 comments on commit 09fd8d1

Please sign in to comment.