summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-03-20 01:53:28 -0600
committerGitHub <noreply@github.com>2017-03-20 01:53:28 -0600
commitdaa7e1109598417e133d756083b8fc8c75a2850f (patch)
tree3e05225a2e7353eec466a4b2bc03cd4dba7b3396
parent85d7e600c14c70ca9ef5772d3ab208c334e3a8e5 (diff)
parenta860ee3a45d46a409173c684caf67e296843120c (diff)
downloadnextcloud-server-daa7e1109598417e133d756083b8fc8c75a2850f.tar.gz
nextcloud-server-daa7e1109598417e133d756083b8fc8c75a2850f.zip
Merge pull request #3947 from nextcloud/downstream-27323
Disable empty password for user::resetpassword command using CLI
-rw-r--r--core/Command/User/ResetPassword.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/Command/User/ResetPassword.php b/core/Command/User/ResetPassword.php
index 3388ef6a1bd..56260e9714a 100644
--- a/core/Command/User/ResetPassword.php
+++ b/core/Command/User/ResetPassword.php
@@ -100,6 +100,11 @@ class ResetPassword extends Command {
$question->setHidden(true);
$password = $helper->ask($input, $output, $question);
+ if ($password === null) {
+ $output->writeln("<error>Password cannot be empty!</error>");
+ return 1;
+ }
+
$question = new Question('Confirm the new password: ');
$question->setHidden(true);
$confirm = $helper->ask($input, $output, $question);