File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,7 +167,12 @@ function saml_acs() {
167167 $ attrs = $ auth ->getAttributes ();
168168
169169 if (empty ($ attrs )) {
170- $ username = $ auth ->getNameId ();
170+ $ nameid = $ auth ->getNameId ();
171+ if (empty ($ nameid )) {
172+ echo __ ("The SAMLResponse may contain NameID or AttributeStatement " );
173+ exit ();
174+ }
175+ $ username = $ nameid ;
171176 $ email = $ username ;
172177 } else {
173178 $ usernameMapping = get_option ('onelogin_saml_attr_mapping_username ' );
Original file line number Diff line number Diff line change 9797 'wantMessagesSigned ' => $ opt ['wantMessagesSigned ' ] == 'on ' ? true : false ,
9898 'wantAssertionsSigned ' => $ opt ['wantAssertionsSigned ' ] == 'on ' ? true : false ,
9999 'wantAssertionsEncrypted ' => $ opt ['wantAssertionsEncrypted ' ] == 'on ' ? true : false ,
100+ 'wantNameId ' => false ,
100101 'requestedAuthnContext ' => $ opt ['requestedAuthnContext ' ],
101102 'relaxDestinationValidation ' => true ,
102103 'lowercaseUrlencoding ' => get_option ('
You can’t perform that action at this time.
0 commit comments