summaryrefslogtreecommitdiffstats
path: root/core/lostpassword
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2012-09-29 16:44:02 +0200
committerLukas Reschke <lukas@statuscode.ch>2012-09-29 16:44:02 +0200
commitef57e9294b52b838f65c9896c6d85c2f8663c90b (patch)
treef7bc3d7724f4a9c81b01ecb2e8361991e7993b6f /core/lostpassword
parent992c2c9d4bc20db1dc8170dcc60dc4438dc55eb0 (diff)
downloadnextcloud-server-ef57e9294b52b838f65c9896c6d85c2f8663c90b.tar.gz
nextcloud-server-ef57e9294b52b838f65c9896c6d85c2f8663c90b.zip
Fallback for systems without openssl
Diffstat (limited to 'core/lostpassword')
-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 7c6d51d99b8..4cd8b9079fd 100644
--- a/core/lostpassword/index.php
+++ b/core/lostpassword/index.php
@@ -13,7 +13,7 @@ require_once '../../lib/base.php';
// Someone lost their password:
if (isset($_POST['user'])) {
if (OC_User::userExists($_POST['user'])) {
- $token = hash("sha256", $_POST['user'].openssl_random_pseudo_bytes(10, $cstrong));
+ $token = hash("sha256", $_POST['user'].OC_Util::generate_random_bytes(10));
OC_Preferences::setValue($_POST['user'], 'owncloud', 'lostpassword', $token);
$email = OC_Preferences::getValue($_POST['user'], 'settings', 'email', '');
if (!empty($email)) {