Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#801] fix issue with IdP initiated login after upgrade to v2.0.5 (#802) #803

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 3 additions & 18 deletions .extlib/simplesamlphp/modules/saml/src/Auth/Source/SP.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,24 +307,9 @@ public function getHostedMetadata(): array
public function getIdPMetadata(string $entityId): Configuration
{
// auth_saml2 modification.
global $saml2auth;
if ($this->idp !== null && $this->idp !== $entityId) {
foreach ($saml2auth->metadataentities as $metadataurl => $idpentities) {
if ($metadataurl == $entityId) {
foreach ($idpentities as $key => $val) {
if ($key == $this->idp) {
$this->idp = null;
}
break 2;

}
}
}
}
if ($this->idp !== null && $this->idp !== $entityId) {
throw new Error\Exception('Cannot retrieve metadata for IdP ' .
var_export($entityId, true) . ' because it isn\'t a valid IdP for this SP.');
}
// Set the IdP to null, so it can auto-detect.
// Avoid the case where it uses the default IdP data for IdP initiated login.
$this->idp = null;

$metadataHandler = MetaDataStorageHandler::getMetadataHandler();

Expand Down
Loading