Skip to content

Commit

Permalink
also avoid login redirect to user_oidc's single logout
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Jan 16, 2024
1 parent bba1392 commit ec99f0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ private function registerRedirect(IRequest $request, IURLGenerator $urlGenerator
// To avoid login/logout loop if the IdP session is still alive:
// if the login page's redirect_url GET param is the logout page, just use the base URL instead
$logoutUrl = $urlGenerator->linkToRoute('core.login.logout');
if (strpos($redirectUrl, $logoutUrl) !== false) {
$userOidcLogoutUrl = $urlGenerator->linkToRoute(self::APP_ID . '.login.singleLogoutService');
if (strpos($redirectUrl, $logoutUrl) !== false || strpos($redirectUrl, $userOidcLogoutUrl) !== false) {
$redirectUrl = $urlGenerator->getBaseUrl();
}
$targetUrl = $urlGenerator->linkToRoute(self::APP_ID . '.login.login', [
Expand Down

0 comments on commit ec99f0c

Please sign in to comment.