summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-04-04 08:37:34 +0400
committerAndrew Dolgov <[email protected]>2012-04-04 08:37:34 +0400
commit21e42e5fb08555f71fd6aefa34be80ddf43aef06 (patch)
tree86aaffdf32080d90f1c77298f16cb059d1e3e5d2 /include
parentecbd7b91fe22b9d2fe13cbe6e2483b85b400ec9b (diff)
fix csrf_token for single user mode
Diffstat (limited to 'include')
-rw-r--r--include/functions.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index 6bc3ca4f9..27c24f8ed 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -838,7 +838,10 @@
$_SESSION["uid"] = 1;
$_SESSION["name"] = "admin";
$_SESSION["access_level"] = 10;
- $_SESSION["csrf_token"] = sha1(uniqid(rand(), true));
+
+ if (!$_SESSION["csrf_token"]) {
+ $_SESSION["csrf_token"] = sha1(uniqid(rand(), true));
+ }
$_SESSION["ip_address"] = $_SERVER["REMOTE_ADDR"];