From bb22e9b254adcede98c4bb9ca893f0568678735d Mon Sep 17 00:00:00 2001 From: mattpass Date: Sat, 1 Feb 2020 13:47:52 +0000 Subject: [PATCH] Unescape $ when creating the password first time --- lib/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/settings.php b/lib/settings.php index 4c4887f..8801afc 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -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);