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/private/user | |
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/private/user')
-rw-r--r-- | lib/private/user/session.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/user/session.php b/lib/private/user/session.php index 11938db5076..5517e08a25d 100644 --- a/lib/private/user/session.php +++ b/lib/private/user/session.php @@ -234,7 +234,7 @@ class Session implements IUserSession, Emitter { } // replace successfully used token with a new one \OC_Preferences::deleteKey($uid, 'login_token', $currentToken); - $newToken = \OC_Util::generateRandomBytes(32); + $newToken = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate(32); \OC_Preferences::setValue($uid, 'login_token', $newToken, time()); $this->setMagicInCookie($user->getUID(), $newToken); |