aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/json.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-08-26 16:03:05 +0200
committerGitHub <noreply@github.com>2016-08-26 16:03:05 +0200
commit89c78bbce48ccd75e42245bf1d92910c50e2648f (patch)
tree7362a768fc265e36cc5f97e2459622d399962595 /lib/private/legacy/json.php
parentc20aef87956ce0cc442d809f417f40d61bcd1485 (diff)
parent6af2efb67931863b27d96c74cdff1d2ca2615e52 (diff)
downloadnextcloud-server-89c78bbce48ccd75e42245bf1d92910c50e2648f.tar.gz
nextcloud-server-89c78bbce48ccd75e42245bf1d92910c50e2648f.zip
Merge pull request #1031 from nextcloud/2fa-infinite-redirect-loop
prevent infinite redirect loops if the there is no 2fa provider to pass
Diffstat (limited to 'lib/private/legacy/json.php')
-rw-r--r--lib/private/legacy/json.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/legacy/json.php b/lib/private/legacy/json.php
index 2882ac94ea9..f386d03ab1b 100644
--- a/lib/private/legacy/json.php
+++ b/lib/private/legacy/json.php
@@ -68,7 +68,7 @@ class OC_JSON{
public static function checkLoggedIn() {
$twoFactorAuthManger = \OC::$server->getTwoFactorAuthManager();
if( !OC_User::isLoggedIn()
- || $twoFactorAuthManger->needsSecondFactor()) {
+ || $twoFactorAuthManger->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
$l = \OC::$server->getL10N('lib');
http_response_code(\OCP\AppFramework\Http::STATUS_UNAUTHORIZED);
self::error(array( 'data' => array( 'message' => $l->t('Authentication error'), 'error' => 'authentication_error' )));