summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-06-03 22:31:38 +0200
committerAndreas Gohr <andi@splitbrain.org>2008-06-03 22:31:38 +0200
commit09c2d803ca738992288c138eab41f35008e3e3df (patch)
tree66d58eda178c279165b92362fb47fe6a62905548
parentf13fa892aab9df4b816e1227fe328acd7ba9b35b (diff)
downloadrpg-09c2d803ca738992288c138eab41f35008e3e3df.tar.gz
rpg-09c2d803ca738992288c138eab41f35008e3e3df.tar.bz2
reopen the session for storing the auth token
darcs-hash:20080603203138-7ad00-cce00e99b64c53b6ffa11748262a3a8c2cd1e37e.gz
-rw-r--r--inc/auth.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/inc/auth.php b/inc/auth.php
index d7effdc9e..a71a5aa86 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -215,7 +215,9 @@ function auth_validateToken($token){
*/
function auth_createToken(){
$token = md5(mt_rand());
+ @session_start(); // reopen the session if needed
$_SESSION[DOKU_COOKIE]['auth']['token'] = $token;
+ session_write_close();
return $token;
}