summaryrefslogtreecommitdiffstats
path: root/inc/user.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/user.inc.php')
-rw-r--r--inc/user.inc.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php
index 595f4745..49500aa2 100644
--- a/inc/user.inc.php
+++ b/inc/user.inc.php
@@ -56,9 +56,17 @@ class User
return false;
if (!Crypto::verify($pass, $ret['passwd']))
return false;
- Session::create();
+ Session::create($ret['passwd']);
Session::set('uid', $ret['userid']);
- Session::set('token', md5(rand() . time() . rand() . $_SERVER['REMOTE_ADDR'] . rand() . $_SERVER['REMOTE_PORT'] . rand() . $_SERVER['HTTP_USER_AGENT']));
+ Session::set('token', md5($ret['passwd'] . ','
+ . rand() . ','
+ . time() . ','
+ . rand() . ','
+ . $_SERVER['REMOTE_ADDR'] . ','
+ . rand() . ','
+ . $_SERVER['REMOTE_PORT'] . ','
+ . rand() . ','
+ . $_SERVER['HTTP_USER_AGENT']));
Session::save();
return true;
}