From 604358bfd77e0812002e09554a642aa7529c6301 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Wed, 18 Oct 2023 23:26:56 +0200 Subject: [PATCH] Add assertion to ensure binding matches idpdisco-specs --- src/SAML2/XML/idpdisc/DiscoveryResponse.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SAML2/XML/idpdisc/DiscoveryResponse.php b/src/SAML2/XML/idpdisc/DiscoveryResponse.php index 2671173b4..e4ee970ad 100644 --- a/src/SAML2/XML/idpdisc/DiscoveryResponse.php +++ b/src/SAML2/XML/idpdisc/DiscoveryResponse.php @@ -6,6 +6,7 @@ use SimpleSAML\Assert\Assert; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\Exception\ProtocolViolationException; use SimpleSAML\SAML2\XML\md\AbstractIndexedEndpointType; /** @@ -48,6 +49,7 @@ public function __construct( array $attributes = [], array $children = [], ) { + Assert::saml($binding, C::BINDING_IDPDISC, ProtocolViolationException::class); Assert::null( $unused, 'The \'ResponseLocation\' attribute must be omitted for idpdisc:DiscoveryResponse.',