Skip to content

Commit

Permalink
Use hash_equals() rather than direct string comparison (#13136)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasBr committed Sep 13, 2022
1 parent fda5202 commit d0bfcd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/DataObject/ClassDefinition/Data/Password.php
Expand Up @@ -302,7 +302,7 @@ public function verifyPassword($password, DataObject\Concrete $object, $updateHa
}
} else {
$hash = $this->calculateHash($password);
$result = $hash === $objectHash;
$result = hash_equals($objectHash, $hash);
}

return $result;
Expand Down

0 comments on commit d0bfcd4

Please sign in to comment.