Skip to content

Commit

Permalink
Add assertion to ensure binding matches idpdisco-specs
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Oct 18, 2023
1 parent 0e47e15 commit 604358b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/SAML2/XML/idpdisc/DiscoveryResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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.',
Expand Down

0 comments on commit 604358b

Please sign in to comment.