Skip to content

Commit

Permalink
Auth/PublicArea: Fix auto SSO for SOAP and Apache authentication
Browse files Browse the repository at this point in the history
With 871004d the `cmd=force_login`
parameter will always be used if a server request results in the
presentation of the login page. So everytime the login page is
displayed, this parameter is set, even if the `Public Area`
is disabled.
Because of this, the automatic login attempts for `SOAP` and
`Apache` authentication (`ilStartUpGUI::showLoginPage`) do not work
anymore.
This change introduces a further check before
`ilInitialisation::redirectToStartingPage` is called. Without this
change `// fallback, should never happen` in
`ilInitialisation::redirectToStartingPage` does always happen.
  • Loading branch information
mjansenDatabay authored and dsstrassner committed Jan 31, 2023
1 parent b9a66fe commit 748ebc1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Services/Init/classes/class.ilStartUpGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1556,8 +1556,12 @@ protected function processIndexPHP(): void

// In case of an valid session, redirect to starting page
if ($this->authSession->isValid()) {
ilInitialisation::redirectToStartingPage();
return;
if (!$this->user->isAnonymous() || ilPublicSectionSettings::getInstance()->isEnabledForDomain(
$this->httpRequest->getServerParams()['SERVER_NAME']
)) {
ilInitialisation::redirectToStartingPage();
return;
}
}

if (ilPublicSectionSettings::getInstance()->isEnabledForDomain($_SERVER['SERVER_NAME'])) {
Expand Down

0 comments on commit 748ebc1

Please sign in to comment.