diff options
author | J0WI <J0WI@users.noreply.github.com> | 2021-07-07 17:52:46 +0200 |
---|---|---|
committer | J0WI <J0WI@users.noreply.github.com> | 2021-07-08 15:11:31 +0200 |
commit | 3b656446afcac16b53aeb5906cb0d2dd57a23d7e (patch) | |
tree | 05ef4885ca0010e1253acf718cb1567e1d82fc03 /apps/federatedfilesharing | |
parent | 040bc04287dd955194aaa9ec53d69e95d5bb5385 (diff) | |
download | nextcloud-server-3b656446afcac16b53aeb5906cb0d2dd57a23d7e.tar.gz nextcloud-server-3b656446afcac16b53aeb5906cb0d2dd57a23d7e.zip |
Introduce ISecureRandom::CHAR_ALPHANUMERIC
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r-- | apps/federatedfilesharing/lib/TokenHandler.php | 2 | ||||
-rw-r--r-- | apps/federatedfilesharing/tests/TokenHandlerTest.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/federatedfilesharing/lib/TokenHandler.php b/apps/federatedfilesharing/lib/TokenHandler.php index 084d0b0e2a4..ffa81dfd074 100644 --- a/apps/federatedfilesharing/lib/TokenHandler.php +++ b/apps/federatedfilesharing/lib/TokenHandler.php @@ -52,7 +52,7 @@ class TokenHandler { public function generateToken() { $token = $this->secureRandom->generate( self::TOKEN_LENGTH, - ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS); + ISecureRandom::CHAR_ALPHANUMERIC); return $token; } } diff --git a/apps/federatedfilesharing/tests/TokenHandlerTest.php b/apps/federatedfilesharing/tests/TokenHandlerTest.php index 229cb017e33..ab28fc0858b 100644 --- a/apps/federatedfilesharing/tests/TokenHandlerTest.php +++ b/apps/federatedfilesharing/tests/TokenHandlerTest.php @@ -49,7 +49,7 @@ class TokenHandlerTest extends \Test\TestCase { $this->secureRandom->expects($this->once())->method('generate') ->with( $this->expectedTokenLength, - ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS + ISecureRandom::CHAR_ALPHANUMERIC ) ->willReturn('mytoken'); |