Skip to content

Commit

Permalink
Fix sam2int and shibboleth predicates
Browse files Browse the repository at this point in the history
  • Loading branch information
philsmart committed Feb 5, 2024
1 parent 7613d75 commit 990521d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions validators/overlays/all/classes/_rules/check_saml2int.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
<xsl:template match="md:SPSSODescriptor
[contains(@protocolSupportEnumeration, 'urn:oasis:names:tc:SAML:2.0:protocol')]
[md:NameIDFormat]
[not(md:NameIDFormat[.='urn:oasis:names:tc:SAML:2.0:nameid-format:persistent'])]
[not(md:NameIDFormat[.='urn:oasis:names:tc:SAML:2.0:nameid-format:transient'])]">
[not(
(md:NameIDFormat[.='urn:oasis:names:tc:SAML:2.0:nameid-format:persistent']) or
(md:NameIDFormat[.='urn:oasis:names:tc:SAML:2.0:nameid-format:transient'])
)]">
<xsl:call-template name="error">
<xsl:with-param name="m">SP excludes both SAML 2 name identifier formats</xsl:with-param>
</xsl:call-template>
Expand Down
6 changes: 4 additions & 2 deletions validators/overlays/all/classes/_rules/check_shibboleth.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@
We perform a very cursory test for this by insisting that they start with
either "http://" or "https://".
-->
<xsl:template match="md:OrganizationURL[not(starts-with(., 'http://'))]
[not(starts-with(., 'https://'))]">
<xsl:template match="md:OrganizationURL[not(
(starts-with(., 'http://')) or
(starts-with(., 'https://'))
)]">
<xsl:call-template name="error">
<xsl:with-param name="m">OrganizationURL '<xsl:value-of select="."/>' does not start with acceptable prefix</xsl:with-param>
</xsl:call-template>
Expand Down

0 comments on commit 990521d

Please sign in to comment.