From 9925fc7692286451f4fc41f07de06e768f105f82 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Thu, 23 Feb 2012 18:15:12 +0000 Subject: [PATCH] Login now via POST instead of GET & password field Login is now done over a POST for improved security Password box replaces text box, again for security --- lib/settings.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/settings.php b/lib/settings.php index 037fbfd..667309f 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -1,5 +1,5 @@
- +
@@ -92,8 +92,10 @@ if ($accountPassword == "" && isset($_GET['settings'])) { $fh = fopen($settingsFile, 'w') or die("can't update settings file"); fwrite($fh, $settingsContents); fclose($fh); + // Set the session user level + $_SESSION['userLevel'] = 10; // Finally, load again as now this file has changed and auto login - header('Location: index.php?login='.$_POST['accountPassword']); + header('Location: index.php'); } else { // We need to set the password header('Location: lib/settings.php?settings=set');