From 8cb91e28dc01d08e37311dedab17f309be0e3caa Mon Sep 17 00:00:00 2001 From: Brent Pell Date: Wed, 20 Nov 2019 20:23:27 -0600 Subject: [PATCH] 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. --- lib/settings-common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/settings-common.php b/lib/settings-common.php index c6bccba..04a8548 100644 --- a/lib/settings-common.php +++ b/lib/settings-common.php @@ -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