summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-04-04 13:17:03 +0000
committerTom Needham <needham.thomas@gmail.com>2012-04-04 13:18:02 +0000
commit85f9869f6925ef52c1015916bbc28e13c15abc73 (patch)
tree06f219b54a25364d8a1a352138da48d079086218 /core
parent60e3b563e26478eab257413b5cac9b3f619570ac (diff)
downloadnextcloud-server-85f9869f6925ef52c1015916bbc28e13c15abc73.tar.gz
nextcloud-server-85f9869f6925ef52c1015916bbc28e13c15abc73.zip
Make the token really random
Diffstat (limited to 'core')
-rw-r--r--core/lostpassword/index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/lostpassword/index.php b/core/lostpassword/index.php
index 9529c0c957c..a9b7d10804f 100644
--- a/core/lostpassword/index.php
+++ b/core/lostpassword/index.php
@@ -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)) {