Unescape $ when creating the password first time

This commit is contained in:
mattpass
2020-02-01 13:47:52 +00:00
parent 05ef861ff7
commit bb22e9b254

View File

@@ -195,7 +195,7 @@ if ((!$_SESSION['loggedIn'] || $ICEcoder["password"] == "") && !strpos($_SERVER[
} elseif (!$_SESSION['loggedIn']) {
// If the password hasn't been set and we're setting it
if ($ICEcoder["password"] == "" && isset($_POST['submit']) && (strpos($_POST['submit'],"set password")>-1)) {
$password = generateHash(strClean($_POST['password']));
$password = str_replace("\$", "\\$", generateHash(strClean($_POST['password'])));
$settingsContents = getData("../data/".$settingsFile);
// Replace our empty password with the one submitted by user
$settingsContents = str_replace('"password" => "",','"password" => "'.$password.'",',$settingsContents);