diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-01-16 13:14:15 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-01-16 13:14:15 +0100 |
commit | 6726c98bbd7a6744bbf7d22a22224fe25b945ee1 (patch) | |
tree | 1894edae8f8e4956b63b1c961babf2b4fb7a95c5 /apps/twofactor_backupcodes/lib | |
parent | 3b76699c9c49f50268cc42ad7f0b5b9bba577663 (diff) | |
download | nextcloud-server-6726c98bbd7a6744bbf7d22a22224fe25b945ee1.tar.gz nextcloud-server-6726c98bbd7a6744bbf7d22a22224fe25b945ee1.zip |
use constant and clean up unit test
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/twofactor_backupcodes/lib')
-rw-r--r-- | apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php index 487112c7c17..1cf62d18801 100644 --- a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php +++ b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php @@ -78,7 +78,7 @@ class BackupCodeStorage { $uid = $user->getUID(); foreach (range(1, min([$number, 20])) as $i) { - $code = $this->random->generate(self::$CODE_LENGTH, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'); + $code = $this->random->generate(self::$CODE_LENGTH, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS); $dbCode = new BackupCode(); $dbCode->setUserId($uid); |