From 384d1892aa1a0d2aef61ed1fb9f704a106675ed3 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 24 Nov 2014 15:44:43 +0100 Subject: [PATCH] use login name to verify password --- apps/files_encryption/ajax/updatePrivateKeyPassword.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.39.5