File tree 1 file changed +3
-18
lines changed
.extlib/simplesamlphp/modules/saml/src/Auth/Source
1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -307,24 +307,9 @@ public function getHostedMetadata(): array
307
307
public function getIdPMetadata (string $ entityId ): Configuration
308
308
{
309
309
// auth_saml2 modification.
310
- global $ saml2auth ;
311
- if ($ this ->idp !== null && $ this ->idp !== $ entityId ) {
312
- foreach ($ saml2auth ->metadataentities as $ metadataurl => $ idpentities ) {
313
- if ($ metadataurl == $ entityId ) {
314
- foreach ($ idpentities as $ key => $ val ) {
315
- if ($ key == $ this ->idp ) {
316
- $ this ->idp = null ;
317
- }
318
- break 2 ;
319
-
320
- }
321
- }
322
- }
323
- }
324
- if ($ this ->idp !== null && $ this ->idp !== $ entityId ) {
325
- throw new Error \Exception ('Cannot retrieve metadata for IdP ' .
326
- var_export ($ entityId , true ) . ' because it isn \'t a valid IdP for this SP. ' );
327
- }
310
+ // Set the IdP to null, so it can auto-detect.
311
+ // Avoid the case where it uses the default IdP data for IdP initiated login.
312
+ $ this ->idp = null ;
328
313
329
314
$ metadataHandler = MetaDataStorageHandler::getMetadataHandler ();
330
315
You can’t perform that action at this time.
0 commit comments