diff options
Diffstat (limited to 'modules/saml')
-rw-r--r-- | modules/saml/lib/SP/LogoutStore.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/saml/lib/SP/LogoutStore.php b/modules/saml/lib/SP/LogoutStore.php index 94ffe46..020c625 100644 --- a/modules/saml/lib/SP/LogoutStore.php +++ b/modules/saml/lib/SP/LogoutStore.php @@ -210,11 +210,11 @@ class sspmod_saml_SP_LogoutStore { * Log out of the given sessions. * * @param string $authId The authsource ID. - * @param array $nameId The NameID of the user. + * @param \SAML2\XML\saml\NameID $nameId The NameID of the user. * @param array $sessionIndexes The SessionIndexes we should log out of. Logs out of all if this is empty. * @returns int|FALSE Number of sessions logged out, or FALSE if not supported. */ - public static function logoutSessions($authId, array $nameId, array $sessionIndexes) { + public static function logoutSessions($authId, $nameId, array $sessionIndexes) { assert('is_string($authId)'); $store = \SimpleSAML\Store::getInstance(); @@ -223,8 +223,11 @@ class sspmod_saml_SP_LogoutStore { return FALSE; } - /* Normalize NameID. */ - ksort($nameId); + // serialize and anonymize the NameID + // TODO: remove this conditional statement + if (is_array($nameId)) { + $nameId = \SAML2\XML\saml\NameID::fromArray($nameId); + } $strNameId = serialize($nameId); $strNameId = sha1($strNameId); |