diff options
author | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-07-25 11:36:57 +0100 |
---|---|---|
committer | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-07-25 11:36:57 +0100 |
commit | f02b557ce2588ead3f9694a061b8a039ba7036a1 (patch) | |
tree | a84dd0610a52c636f366e4d978ffc0d56b742273 | |
parent | 65af1e7eedacaa724c0f3f83ac69ca8bd2466442 (diff) |
Add support for a passwordless index
-rw-r--r-- | index.php | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,7 +1,7 @@ <?php -$pass = 'REPLACE THIS WITH A SHA256 HASH'; +$pass = 'REPLACE THIS WITH A SHA256 HASH OR SET VARIABLE TO NULL'; -if ($_POST) { +if ($_POST && $pass) { if ((hash("sha256", $_POST['password']) == $pass)) { if (isset($_POST['rememberme'])) { /* Set cookie to last 1 year */ @@ -15,7 +15,7 @@ if ($_POST) { header('Location: http://www.blaupload.co.uk/'); exit(); } -} else { +} else if ($pass) { if (!isset($_COOKIE["password"]) || (isset($_COOKIE["password"]) && $_COOKIE["password"] != $pass)) { ?> <html> |