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 <coding@schilljs.com>2022-03-14 15:30:59 +0300
committerJoas Schilling <coding@schilljs.com>2022-03-14 15:30:59 +0300
commitab29a67a3261ee74d6974391d371229ad46a3be4 (patch)
tree1d049e4143732906e0b91a84031b1f9b8efa18f6
parenta74248b0a050820516c91c3af4b9fe6042e86ac7 (diff)
Allow creating app passwords without validating the user's password againbugfix/31519/revert-password-validation
Aparently the idea behind the command was exactly to do this. Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--core/Command/User/AddAppPassword.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/Command/User/AddAppPassword.php b/core/Command/User/AddAppPassword.php
index 4f636c406fb..7a2270e20b1 100644
--- a/core/Command/User/AddAppPassword.php
+++ b/core/Command/User/AddAppPassword.php
@@ -109,10 +109,7 @@ class AddAppPassword extends Command {
return 1;
}
- if (!$this->userManager->checkPassword($user->getUID(), $password)) {
- $output->writeln('<error>The provided password is invalid</error>');
- return 1;
- }
+ $output->writeln('<comment>The password has not been validated, some features might not work as intended.</comment>');
$token = $this->random->generate(72, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS);
$generatedToken = $this->tokenProvider->generateToken(