From e59afef8ca473a1f17640d6d1f72fcc937060776 Mon Sep 17 00:00:00 2001 From: Cato Olsen <cato.olsen@uninett.no> Date: Mon, 16 Feb 2009 15:26:20 +0000 Subject: [PATCH] If the SP remote metadata lacked 'attributes', all available attributes were released. Changed to no attributes in order to keep consistent with the behaviour when finding an empty 'attributes' array. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1272 44740490-163a-0410-bde0-09ae8108e29a --- modules/core/lib/Auth/Process/AttributeLimit.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/core/lib/Auth/Process/AttributeLimit.php b/modules/core/lib/Auth/Process/AttributeLimit.php index 53ac65212..b5157276e 100644 --- a/modules/core/lib/Auth/Process/AttributeLimit.php +++ b/modules/core/lib/Auth/Process/AttributeLimit.php @@ -58,13 +58,11 @@ class sspmod_core_Auth_Process_AttributeLimit extends SimpleSAML_Auth_Processing } } elseif (array_key_exists('attributes', $request['Destination'])) { $this->allowedAttributes = $request['Destination']['attributes']; - } else { - return; } } $attributes =& $request['Attributes']; - + foreach($attributes as $name => $values) { if(!in_array($name, $this->allowedAttributes, TRUE)) { unset($attributes[$name]); -- GitLab