diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-03 17:46:48 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-03 17:46:48 +0200 |
commit | 63a90a129bedc9baedc2c801fd0744346400379c (patch) | |
tree | 081336db3a01a2f5dc9fa29c1daa3650a66662ca /lib/base.php | |
parent | 7d4317e9fbf1db4e2443344dfed1d25ecc6f1a9a (diff) | |
download | nextcloud-server-63a90a129bedc9baedc2c801fd0744346400379c.tar.gz nextcloud-server-63a90a129bedc9baedc2c801fd0744346400379c.zip |
Use proper RNG generator
OC_Util::generateRandomBytes() only returns lowercase alphanumeric values.
We should use the new RNG which has a broader characterset.
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index 1a99835040a..18331dd86aa 100644 --- a/lib/base.php +++ b/lib/base.php @@ -943,7 +943,7 @@ class OC { if (defined("DEBUG") && DEBUG) { OC_Log::write('core', 'Setting remember login to cookie', OC_Log::DEBUG); } - $token = OC_Util::generateRandomBytes(32); + $token = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate(32); OC_Preferences::setValue($userid, 'login_token', $token, time()); OC_User::setMagicInCookie($userid, $token); } else { |