File tree Expand file tree Collapse file tree
modules/core/lib/Auth/Process Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99use SAML2 \XML \saml \NameID ;
1010use SimpleSAML \Assert \Assert ;
1111use SimpleSAML \Auth ;
12+ use SimpleSAML \Logger ;
1213use SimpleSAML \Utils ;
1314
1415/**
@@ -100,14 +101,16 @@ public function setConfigUtils(Utils\Config $configUtils): void
100101 public function process (array &$ state ): void
101102 {
102103 Assert::keyExists ($ state , 'Attributes ' );
103- Assert::keyExists (
104- $ state ['Attributes ' ],
105- $ this ->identifyingAttribute ,
106- sprintf (
107- "core:TargetedID: Missing attribute '%s', which is needed to generate the targeted ID. " ,
108- $ this ->identifyingAttribute
109- )
110- );
104+ if (!array_key_exists ($ this ->identifyingAttribute , $ state ['Attributes ' ])) {
105+ Logger::warning (
106+ sprintf (
107+ "core:TargetedID: Missing attribute '%s', which is needed to generate the TargetedID. " ,
108+ $ this ->identifyingAttribute
109+ )
110+ );
111+
112+ return ;
113+ }
111114
112115 $ userID = $ state ['Attributes ' ][$ this ->identifyingAttribute ][0 ];
113116 Assert::stringNotEmpty ($ userID );
You can’t perform that action at this time.
0 commit comments