From 0f9d215d1e70d253f4d914027530ef74745b3482 Mon Sep 17 00:00:00 2001 From: Hans Zandbelt <hans.zandbelt@surfnet.nl> Date: Mon, 24 Aug 2009 12:26:02 +0000 Subject: [PATCH] avoid sending empty attribute values git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1708 44740490-163a-0410-bde0-09ae8108e29a --- modules/adfs/www/idp/prp.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/adfs/www/idp/prp.php b/modules/adfs/www/idp/prp.php index 69d148903..51159a814 100644 --- a/modules/adfs/www/idp/prp.php +++ b/modules/adfs/www/idp/prp.php @@ -51,6 +51,7 @@ function ADFS_GenerateResponse($issuer, $target, $nameid, $attributes) { <saml:NameIdentifier Format="' . $nameidFormat . '">' . $nameid . '</saml:NameIdentifier> </saml:Subject>'; foreach ($attributes as $name => $values) { + if ((!is_array($values)) || (count($values) == 0)) continue; $result .= '<saml:Attribute AttributeNamespace="http://schemas.xmlsoap.org/claims" AttributeName="' . $name .'">'; foreach ($values as $value) { $result .= '<saml:AttributeValue>' . $value . '</saml:AttributeValue>'; -- GitLab