diff options
author | Sujith H <sharidasan@owncloud.com> | 2017-03-07 15:39:40 +0530 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-03-20 00:01:12 -0600 |
commit | a860ee3a45d46a409173c684caf67e296843120c (patch) | |
tree | 985dc82845cf852248fe1c48e1a3d3e593d1bdc0 | |
parent | 528a903a7b23ea628e6ec2fc9a221821297c0bec (diff) | |
download | nextcloud-server-a860ee3a45d46a409173c684caf67e296843120c.tar.gz nextcloud-server-a860ee3a45d46a409173c684caf67e296843120c.zip |
Disable empty password for user::resetpassword command using CLI
Fixes issue: https://github.com/owncloud/core/issues/25206
Signed-off-by: Sujith H <sharidasan@owncloud.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r-- | core/Command/User/ResetPassword.php | 5 |
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); |