From a980b284f3c2d588e3778542aaea302acf26f490 Mon Sep 17 00:00:00 2001
From: Renato Botelho
Date: Thu, 8 Jan 2015 11:08:03 -0200
Subject: Fix check for cookies, the way it was implemented didn't work because
it would need a refresh to check if cookie was set or not. Use javascript to
do a simple test
---
etc/inc/authgui.inc | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/etc/inc/authgui.inc b/etc/inc/authgui.inc
index 70ccfd4..0999452 100644
--- a/etc/inc/authgui.inc
+++ b/etc/inc/authgui.inc
@@ -225,16 +225,6 @@ if ($local_ip == false) {
}
}
}
-setcookie(
- "cookie_test",
- 'cookie_test',
- time() + 3600,
- '/',
- NULL,
- ($config['system']['webgui']['protocol'] == "https"),
- true
-);
-$have_cookies = isset($_COOKIE["cookie_test"]);
?>
@@ -304,13 +294,11 @@ $have_cookies = isset($_COOKIE["cookie_test"]);
=gettext("Enter username and password to login."); ?>
-
-
-
+
+
= gettext("Your browser must support cookies to login."); ?>
-
-