summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-08-25 14:23:28 +0200
committerLukas Reschke <lukas@owncloud.com>2014-08-25 14:23:28 +0200
commit992b0f9b0619c99b142e1e70d9ddae4a87d21c02 (patch)
tree60c532372193c402b080c4dbdda225b79c609d23 /core
parent8ab1c84161aee37dde459ff7a30f768fc27d4ef4 (diff)
parentb86e124e03fa9fa3ddb17bfae0b00c28bc402da1 (diff)
downloadnextcloud-server-992b0f9b0619c99b142e1e70d9ddae4a87d21c02.tar.gz
nextcloud-server-992b0f9b0619c99b142e1e70d9ddae4a87d21c02.zip
Merge pull request #10598 from owncloud/warn_on_encryption_occ_pwreset
Warn user on resetting passwords via occ when encryption is enabled
Diffstat (limited to 'core')
-rw-r--r--core/command/user/resetpassword.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/command/user/resetpassword.php b/core/command/user/resetpassword.php
index d7893c291e4..10a21960849 100644
--- a/core/command/user/resetpassword.php
+++ b/core/command/user/resetpassword.php
@@ -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>',