]> source.dussan.org Git - nextcloud-server.git/commitdiff
use login name to verify password
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 24 Nov 2014 14:44:43 +0000 (15:44 +0100)
committerBjoern Schiessle <schiessle@owncloud.com>
Tue, 25 Nov 2014 13:09:22 +0000 (14:09 +0100)
apps/files_encryption/ajax/updatePrivateKeyPassword.php

index f8d291d963f515503cb9f7e421e1cbfce18b034e..86d1478c1714970b1f981bde42396d12a38aa558 100644 (file)
@@ -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) {