Skip to content
Snippets Groups Projects
Commit 4fa61045 authored by Andreas Gohr's avatar Andreas Gohr Committed by GitHub
Browse files

Merge pull request #2133 from kelunik/hash-equals

Use constant type comparison for hashes
parents b1540742 ff45434b
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ class PassHash {
//crypt and compare
$call = 'hash_'.$method;
$newhash = $this->$call($clear, $salt, $magic);
if($newhash === $hash) {
if(\hash_equals($newhash, $hash)) {
return true;
}
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment