diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2021-07-16 12:46:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 12:46:20 +0200 |
commit | f86f594a3a867018a3354e7d26a9932bb0eb11a1 (patch) | |
tree | 422922d5ed4c719568a339f508958d0a59f08338 /apps/federatedfilesharing | |
parent | 23df99dbe080f113c6f8af091e8664979fb59358 (diff) | |
parent | 91051d92073f19908947cf05560de7e78ad80b86 (diff) | |
download | nextcloud-server-f86f594a3a867018a3354e7d26a9932bb0eb11a1.tar.gz nextcloud-server-f86f594a3a867018a3354e7d26a9932bb0eb11a1.zip |
Merge pull request #27860 from J0WI/alphanumeric-rnd
Introduce ISecureRandom::CHAR_ALPHANUMERIC
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'); |