Merge pull request #10598 from owncloud/warn_on_encryption_occ_pwreset
Warn user on resetting passwords via occ when encryption is enabled
This commit is contained in:
commit
992b0f9b06
1 changed files with 10 additions and 0 deletions
|
@ -48,6 +48,16 @@ class ResetPassword extends Command {
|
|||
if ($input->isInteractive()) {
|
||||
/** @var $dialog \Symfony\Component\Console\Helper\DialogHelper */
|
||||
$dialog = $this->getHelperSet()->get('dialog');
|
||||
|
||||
if (\OCP\App::isEnabled('files_encryption')) {
|
||||
$output->writeln(
|
||||
'<error>Warning: Resetting the password when using encryption will result in data loss!</error>'
|
||||
);
|
||||
if (!$dialog->askConfirmation($output, '<question>Do you want to continue?</question>', true)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
$password = $dialog->askHiddenResponse(
|
||||
$output,
|
||||
'<question>Enter a new password: </question>',
|
||||
|
|
Loading…
Reference in a new issue