Skip to content

Commit 39ab84d

Browse files
committed
Arbitrary attributes cannot be from saml-namespaces
1 parent 78c7281 commit 39ab84d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/XML/saml/AbstractSubjectConfirmationData.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,6 @@ public function __construct(
9494
}
9595

9696
$this->setElements($children);
97-
98-
foreach ($namespacedAttributes as $attr) {
99-
Assert::notNull(
100-
$attr->getNamespaceURI(),
101-
"Local (non-namespaced) attributes are not allowed.",
102-
ProtocolViolationException::class,
103-
);
104-
}
10597
$this->setAttributesNS($namespacedAttributes);
10698
}
10799

src/XML/saml/Attribute.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ class Attribute extends AbstractSamlElement implements
3737
/** The namespace-attribute for the xs:anyAttribute element */
3838
public const string XS_ANY_ATTR_NAMESPACE = NS::OTHER;
3939

40+
/**
41+
* The exclusions for the xs:anyAttribute element
42+
*
43+
* @var array<int, array<int, string>>
44+
*/
45+
public const array XS_ANY_ATTR_EXCLUSIONS = [
46+
['urn:oasis:names:tc:SAML:2.0:assertion', '*'],
47+
['urn:oasis:names:tc:SAML:2.0:protocol', '*'],
48+
];
49+
4050

4151
/**
4252
* Initialize an Attribute.

0 commit comments

Comments
 (0)