[Pkg-owncloud-commits] [owncloud] 10/22: Warn user on resetting passwords via occ when encryption is enabled

David Prévot taffit at moszumanska.debian.org
Fri Aug 29 14:48:57 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit e552573bedb40485473d48af5ce8bb95c81a31a9
Author: kondou <kondou at ts.unde.re>
Date:   Fri Aug 22 16:11:54 2014 +0200

    Warn user on resetting passwords via occ when encryption is enabled
---
 core/command/user/resetpassword.php | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/core/command/user/resetpassword.php b/core/command/user/resetpassword.php
index d7893c2..10a2196 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>',

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list