From: Bjoern Schiessle Date: Mon, 24 Nov 2014 14:44:43 +0000 (+0100) Subject: use login name to verify password X-Git-Tag: v7.0.4RC1~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=384d1892aa1a0d2aef61ed1fb9f704a106675ed3;p=nextcloud-server.git use login name to verify password --- diff --git a/apps/files_encryption/ajax/updatePrivateKeyPassword.php b/apps/files_encryption/ajax/updatePrivateKeyPassword.php index f8d291d963f..86d1478c171 100644 --- a/apps/files_encryption/ajax/updatePrivateKeyPassword.php +++ b/apps/files_encryption/ajax/updatePrivateKeyPassword.php @@ -26,9 +26,10 @@ $newPassword = $_POST['newPassword']; $view = new \OC\Files\View('/'); $session = new \OCA\Encryption\Session($view); $user = \OCP\User::getUser(); +$loginName = \OC::$server->getUserSession()->getLoginName(); // check new password -$passwordCorrect = \OCP\User::checkPassword($user, $newPassword); +$passwordCorrect = \OCP\User::checkPassword($loginName, $newPassword); if ($passwordCorrect !== false) {