From 742a4306869e36f24715f6b771f97f455a08af43 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Sun, 28 Jan 2024 23:50:34 +0100 Subject: [PATCH] Fix: RequestSecurityTokenType can contains saml-elements --- src/XML/wst/AbstractRequestSecurityTokenType.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/XML/wst/AbstractRequestSecurityTokenType.php b/src/XML/wst/AbstractRequestSecurityTokenType.php index 918ef00c..652e72eb 100644 --- a/src/XML/wst/AbstractRequestSecurityTokenType.php +++ b/src/XML/wst/AbstractRequestSecurityTokenType.php @@ -6,6 +6,7 @@ use DOMElement; use SimpleSAML\Assert\Assert; +use SimpleSAML\SAML2\XML\saml\Assertion; use SimpleSAML\WSSecurity\Constants as C; use SimpleSAML\WSSecurity\XML\wsp\AppliesTo; use SimpleSAML\WSSecurity\XML\wsp\Policy; @@ -95,6 +96,11 @@ public static function fromXML(DOMElement $xml): static foreach ($xml->childNodes as $child) { if (!($child instanceof DOMElement)) { continue; + } elseif ($child->namespaceURI === C::NS_SAML) { + $children[] = match ($child->localName) { + 'Assertion' => Assertion::fromXML($child), + default => Chunk::fromXML($child), + }; } elseif ($child->namespaceURI === C::NS_TRUST) { $children[] = match ($child->localName) { 'AllowPostdating' => AllowPostdating::fromXML($child),