Skip to content
Snippets Groups Projects
Commit a890b604 authored by Jaime Pérez's avatar Jaime Pérez
Browse files

bugfix: Make sure a persistent NameID is not generated by default when the...

bugfix: Make sure a persistent NameID is not generated by default when the UserID is missing in the state array.

This allowed misconfigured IdPs (i.e. those without both a PersistenNameID authproc filter, a “userid.attribute” configuration option and no “eduPersonPrincipalName” attribute available after running all the authentication processing filters) to generate a persistent NameID based on “null”, effectively giving all users the same identifier.
parent baba857a
No related branches found
No related tags found
No related merge requests found
......@@ -680,6 +680,7 @@ class sspmod_saml_IdP_SAML2
if ($attribute === null) {
if (!isset($state['UserID'])) {
SimpleSAML\Logger::error('Unable to generate NameID. Check the userid.attribute option.');
return null;
}
$attributeValue = $state['UserID'];
$idpEntityId = $idpMetadata->getString('entityid');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment