[Pkg-owncloud-commits] [owncloud] 15/52: loginname is not necessarily username
David Prévot
taffit at moszumanska.debian.org
Mon Dec 2 01:49:37 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit ee78d4818607d9af18a4b045ff9e11caea563069
Author: Arthur Schiwon <blizzz at owncloud.com>
Date: Thu Nov 28 13:26:31 2013 +0100
loginname is not necessarily username
---
apps/files_encryption/ajax/getMigrationStatus.php | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/apps/files_encryption/ajax/getMigrationStatus.php b/apps/files_encryption/ajax/getMigrationStatus.php
index 4da035a..17469a1 100644
--- a/apps/files_encryption/ajax/getMigrationStatus.php
+++ b/apps/files_encryption/ajax/getMigrationStatus.php
@@ -10,14 +10,15 @@ use OCA\Encryption\Util;
\OCP\JSON::checkAppEnabled('files_encryption');
-$user = isset($_POST['user']) ? $_POST['user'] : '';
+$loginname = isset($_POST['user']) ? $_POST['user'] : '';
$password = isset($_POST['password']) ? $_POST['password'] : '';
$migrationCompleted = true;
-if ($user !== '' && $password !== '') {
- if (\OCP\User::checkPassword($user, $password)) {
- $util = new Util(new \OC_FilesystemView('/'), $user);
+if ($loginname !== '' && $password !== '') {
+ $username = \OCP\User::checkPassword($loginname, $password);
+ if ($username) {
+ $util = new Util(new \OC_FilesystemView('/'), $username);
if ($util->getMigrationStatus() !== Util::MIGRATION_COMPLETED) {
$migrationCompleted = false;
}
--
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