This commit has been accessed 979 times via Git panel.
commit 499c0b9d735e4c4dbdcde9ee66a8eddc96b042ca
tree 2f7c91035f41f16c0db54a1c2d7fe1f63a315633
parent 295d6f089b7f9ed6711512bec75e091e320a7f76
author Engels Antonio <engels@kartero.org> 1386932023 +0800
committer Engels Antonio <engels@kartero.org> 1386932023 +0800
Add simple login/logout token
diff --git a/index.php b/index.php
index 7b254cf..c057dca 100644
--- a/index.php
+++ b/index.php
@@ -211,7 +211,9 @@ if (!isset($_SESSION['logged_uid']) and (($pw_put != $pw_get) or !isset($_POST['
if (isset($_SESSION['logged_uid'])) {
- echo "<nobr>You are currently logged in to your {$_SESSION['logged_uid']} {$_SESSION['logged_lvl']} account. Click <a href=\"?do=logout\">here</a> to logout.</nobr><br><br>";
+ $token = uniqid();
+
+ echo "<nobr>You are currently logged in to your {$_SESSION['logged_uid']} {$_SESSION['logged_lvl']} account. Click <a href=\"?do=logout&token=$token\">here</a> to logout.</nobr><br><br>";
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">";
echo "<tr><td colspan=\"3\" valign=\"top\">";
tree 2f7c91035f41f16c0db54a1c2d7fe1f63a315633
parent 295d6f089b7f9ed6711512bec75e091e320a7f76
author Engels Antonio <engels@kartero.org> 1386932023 +0800
committer Engels Antonio <engels@kartero.org> 1386932023 +0800
Add simple login/logout token
diff --git a/index.php b/index.php
index 7b254cf..c057dca 100644
--- a/index.php
+++ b/index.php
@@ -211,7 +211,9 @@ if (!isset($_SESSION['logged_uid']) and (($pw_put != $pw_get) or !isset($_POST['
if (isset($_SESSION['logged_uid'])) {
- echo "<nobr>You are currently logged in to your {$_SESSION['logged_uid']} {$_SESSION['logged_lvl']} account. Click <a href=\"?do=logout\">here</a> to logout.</nobr><br><br>";
+ $token = uniqid();
+
+ echo "<nobr>You are currently logged in to your {$_SESSION['logged_uid']} {$_SESSION['logged_lvl']} account. Click <a href=\"?do=logout&token=$token\">here</a> to logout.</nobr><br><br>";
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">";
echo "<tr><td colspan=\"3\" valign=\"top\">";