From: Andrew Dolgov Date: Wed, 4 Apr 2012 04:37:34 +0000 (+0400) Subject: fix csrf_token for single user mode X-Git-Tag: 1.5.11~15 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=21e42e5fb08555f71fd6aefa34be80ddf43aef06;p=tt-rss.git fix csrf_token for single user mode --- diff --git a/include/functions.php b/include/functions.php index 6bc3ca4f..27c24f8e 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"];