Skip to content

Commit

Permalink
CIL-610 When allowing bypass via idphint, must set providerId in the …
Browse files Browse the repository at this point in the history
…portalcookie so OAuth2 providers work as expected (bug fix).
  • Loading branch information
terrencegf committed Dec 2, 2019
1 parent 4d95f70 commit 3bea6df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Service/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,12 @@ public static function handleNoSubmitButtonClicked()
// make sure that it matches the saved providerId. If not,
// then show the Logon page and uncheck the keepidp checkbox.
if ((strlen($selected_idp) == 0) || ($selected_idp == $providerId)) {
if (strlen($pn) > 0) {
$pc->set('providerId', $providerId);
$pc->write();
} else {
Util::setCookieVar('providerId', $providerId);
}
$providerName = Util::getAuthzIdP($providerId);
if (in_array($providerName, Util::$oauth2idps)) {
// Log in with an OAuth2 IdP
Expand Down

0 comments on commit 3bea6df

Please sign in to comment.