Merge pull request #10845 from owncloud/usealphanumericstring
Only return lowercase letters and digits for backwards compatbility
This commit is contained in:
commit
7d4317e9fb
|
@ -1211,7 +1211,7 @@ class OC_Util {
|
||||||
* @deprecated Use \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate($length); instead
|
* @deprecated Use \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate($length); instead
|
||||||
*/
|
*/
|
||||||
public static function generateRandomBytes($length = 30) {
|
public static function generateRandomBytes($length = 30) {
|
||||||
return \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate($length);
|
return \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate($length, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue