Make the token really random

This commit is contained in:
Tom Needham 2012-04-04 13:17:03 +00:00
parent 60e3b563e2
commit 85f9869f69
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ require_once('../../lib/base.php');
// Someone lost their password:
if (isset($_POST['user'])) {
if (OC_User::userExists($_POST['user'])) {
$token = sha1($_POST['user'].uniqId());
$token = sha1($_POST['user'].md5(uniqid(rand(), true)));
OC_Preferences::setValue($_POST['user'], 'owncloud', 'lostpassword', $token);
$email = OC_Preferences::getValue($_POST['user'], 'settings', 'email', '');
if (!empty($email)) {