Fix for Issue #791

When you hit the "Update" button in the settings menu for any reason, no matter
if you change anything or not, the password field in this file is updated and the
slashes"" are stripped and PHP can't properly read the hashed password without
the dollar signs escaped.
This commit is contained in:
Brent Pell
2019-11-20 20:23:27 -06:00
committed by GitHub
parent 1a35c8e270
commit 8cb91e28dc

View File

@@ -164,7 +164,7 @@ define('SALT_LENGTH',12);
// Generate hash
function generateHash($pw) {
// Generate Bcrypt hash
return str_replace("\$", "\\$", password_hash($pw, PASSWORD_BCRYPT, $options = ['cost' => 10]));
return password_hash($pw, PASSWORD_BCRYPT, $options = ['cost' => 10]);
}
// Verify hash