diff --git a/header.php b/header.php index 9d092e77..2d6b20e1 100644 --- a/header.php +++ b/header.php @@ -217,41 +217,41 @@
  • MAIN NAVIGATION
  • - + Main Page
  • - + Query Log
  • - + Whitelist
  • - + Blacklist
  • - + Update lists
  • Disable'; + echo '
  • Disable
  • '; } else { - echo '
  • Enable
  • '; + echo '
  • Enable
  • '; } ?> @@ -265,7 +265,7 @@ // Show Logout button if $auth is set and authorization is required if(strlen($pwhash) > 0) { ?>
  • - + Logout
  • diff --git a/php/password.php b/php/password.php index 517fb965..3f9b14c6 100644 --- a/php/password.php +++ b/php/password.php @@ -1,6 +1,11 @@ 0) { @@ -9,29 +14,26 @@ { $postinput = hash('sha256',hash('sha256',$_POST["pw"])); if($postinput == $pwhash) + { + $_SESSION["hash"] = $pwhash; $auth = true; + } } // Compare auth hash with saved hash - else if (isset($_GET["auth"])) + else if (isset($_SESSION["hash"])) { - if($_GET["auth"] == $pwhash) + if($_SESSION["hash"] == $pwhash) $auth = true; } else { // Password or hash wrong $auth = false; - $pwstring = ""; } - // If authorized, then set the hash that will be - // passed through using GET - if($auth) - $pwstring = "auth=".$pwhash; } else { // No password set $auth = true; - $pwstring = ""; } ?>