summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-03-14 13:30:59 +0100
committerJoas Schilling <coding@schilljs.com>2022-03-14 13:30:59 +0100
commitab29a67a3261ee74d6974391d371229ad46a3be4 (patch)
tree1d049e4143732906e0b91a84031b1f9b8efa18f6 /core
parenta74248b0a050820516c91c3af4b9fe6042e86ac7 (diff)
downloadnextcloud-server-ab29a67a3261ee74d6974391d371229ad46a3be4.tar.gz
nextcloud-server-ab29a67a3261ee74d6974391d371229ad46a3be4.zip
Allow creating app passwords without validating the user's password again
Aparently the idea behind the command was exactly to do this. Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core')
-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(