aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-11-24 15:44:43 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2014-11-24 15:44:43 +0100
commit1645c8f81954c6a5ada8a178b6acd6d50da318f0 (patch)
treed959d7173b6532835b0f2e072a37f149efb4ea14
parent168fce0b182e69d1364e4432178a8131961d6583 (diff)
downloadnextcloud-server-1645c8f81954c6a5ada8a178b6acd6d50da318f0.tar.gz
nextcloud-server-1645c8f81954c6a5ada8a178b6acd6d50da318f0.zip
use login name to verify password
-rw-r--r--apps/files_encryption/ajax/updatePrivateKeyPassword.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_encryption/ajax/updatePrivateKeyPassword.php b/apps/files_encryption/ajax/updatePrivateKeyPassword.php
index 0f182e93831..fa5e279b21b 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) {