summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorLuke Bratch <l_bratch@yahoo.co.uk>2014-07-25 11:36:57 +0100
committerLuke Bratch <l_bratch@yahoo.co.uk>2014-07-25 11:36:57 +0100
commitf02b557ce2588ead3f9694a061b8a039ba7036a1 (patch)
treea84dd0610a52c636f366e4d978ffc0d56b742273 /index.php
parent65af1e7eedacaa724c0f3f83ac69ca8bd2466442 (diff)
Add support for a passwordless index
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/index.php b/index.php
index 5ef509d..d234a50 100644
--- a/index.php
+++ b/index.php
@@ -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>