From 2a9c96595bf10ff6b89378aef5494a41032551ee Mon Sep 17 00:00:00 2001 From: NicolasLiampotis Date: Wed, 13 Jan 2021 20:40:03 +0000 Subject: [PATCH] Preserve values of duplicate variables when parsing SAML metadata --- lib/SimpleSAML/Metadata/SAMLParser.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/SimpleSAML/Metadata/SAMLParser.php b/lib/SimpleSAML/Metadata/SAMLParser.php index 2c8fb8fb9d..287bf35be0 100644 --- a/lib/SimpleSAML/Metadata/SAMLParser.php +++ b/lib/SimpleSAML/Metadata/SAMLParser.php @@ -1107,7 +1107,11 @@ private static function processExtensions($element, $parentExtensions = []) $values[] = $attrval->getString(); } - $ret['EntityAttributes'][$name] = $values; + if (empty($ret['EntityAttributes'][$name])) { + $ret['EntityAttributes'][$name] = $values; + } else { + $ret['EntityAttributes'][$name] = array_merge($ret['EntityAttributes'][$name], $values); + } } } }