Merge pull request #4192 from nextcloud/fix/custom-default-app-redirect-2fa-selection

Redirect to 2FA selection screen
This commit is contained in:
Morris Jobke 2017-04-04 15:47:35 -05:00 committed by GitHub
commit b78876236d
1 changed files with 2 additions and 2 deletions

View File

@ -981,9 +981,9 @@ class OC_Util {
);
exit();
}
// Redirect to index page if 2FA challenge was not solved yet
// Redirect to 2FA challenge selection if 2FA challenge was not solved yet
if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
header('Location: ' . \OCP\Util::linkToAbsolute('', 'index.php'));
header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
exit();
}
}