Browse Source

Make the token really random

remotes/origin/stable4
Tom Needham 15 years ago
parent
commit
85f9869f69
  1. 2
      core/lostpassword/index.php

2
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)) {

Loading…
Cancel
Save