Merge pull request #1652 from aidantwoods/hash_equals-for-pwhash-compare

Use hash_equals when comparing to pwhash from cookie
This commit is contained in:
Adam Warner
2020-12-06 13:45:59 +00:00
committed by GitHub
+1 -1
View File
@@ -42,7 +42,7 @@
// Check for and authorize from persistent cookie
if (isset($_COOKIE["persistentlogin"]))
{
if ($pwhash === $_COOKIE["persistentlogin"])
if (hash_equals($pwhash, $_COOKIE["persistentlogin"]))
{
$auth = true;
// Refresh cookie with new expiry