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>
This commit is contained in:
Sujith H 2017-03-07 15:39:40 +05:30 committed by Morris Jobke
parent 528a903a7b
commit a860ee3a45
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 5 additions and 0 deletions

View File

@ -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);