Merge pull request #3947 from nextcloud/downstream-27323
Disable empty password for user::resetpassword command using CLI
This commit is contained in:
commit
daa7e11095
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue