Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2021-07-16 13:46:20 +0300
committerGitHub <noreply@github.com>2021-07-16 13:46:20 +0300
commitf86f594a3a867018a3354e7d26a9932bb0eb11a1 (patch)
tree422922d5ed4c719568a339f508958d0a59f08338 /apps/sharebymail
parent23df99dbe080f113c6f8af091e8664979fb59358 (diff)
parent91051d92073f19908947cf05560de7e78ad80b86 (diff)
Merge pull request #27860 from J0WI/alphanumeric-rnd
Introduce ISecureRandom::CHAR_ALPHANUMERIC
Diffstat (limited to 'apps/sharebymail')
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php2
-rw-r--r--apps/sharebymail/tests/ShareByMailProviderTest.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index 74e78c48d86..6fb60216031 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -224,7 +224,7 @@ class ShareByMailProvider implements IShareProvider {
$password = $passwordEvent->getPassword();
if ($password === null) {
- $password = $this->secureRandom->generate(8, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS);
+ $password = $this->secureRandom->generate(8, ISecureRandom::CHAR_HUMAN_READABLE);
}
return $password;
diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php
index 64d81aab254..a82da164b78 100644
--- a/apps/sharebymail/tests/ShareByMailProviderTest.php
+++ b/apps/sharebymail/tests/ShareByMailProviderTest.php
@@ -301,7 +301,7 @@ class ShareByMailProviderTest extends TestCase {
$this->secureRandom->expects($this->once())
->method('generate')
- ->with(8, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS)
+ ->with(8, ISecureRandom::CHAR_HUMAN_READABLE)
->willReturn('autogeneratedPassword');
$this->eventDispatcher->expects($this->once())
->method('dispatchTyped')