Skip to content

Commit

Permalink
Check for OrganizationURL elements that don't contain properly format…
Browse files Browse the repository at this point in the history
…ted URLs.
  • Loading branch information
iay committed Feb 15, 2010
1 parent 87a7cdc commit e376fbd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build/check.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,23 @@
</xsl:template>


<!--
OrganizationURL elements should contain actual URLs, or some software
will reject the metadata. This is known to be true for at least the Shibboleth
1.3 IdP and the accompanying metadatatool application, because they pass the
string to the java.net.URL class.
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:call-template name="fatal">
<xsl:with-param name="m">OrganizationURL '<xsl:value-of select="."/>' does not start with acceptable prefix</xsl:with-param>
</xsl:call-template>
</xsl:template>


<!--
Checks for an IdP whose KeyDescriptor elements do not include a @use attribute.
This causes problems with the Shibboleth 1.3 SP prior to V1.3.1, which
Expand Down
17 changes: 17 additions & 0 deletions build/check_imported.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@
</xsl:template>


<!--
OrganizationURL elements should contain actual URLs, or some software
will reject the metadata. This is known to be true for at least the Shibboleth
1.3 IdP and the accompanying metadatatool application, because they pass the
string to the java.net.URL class.
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:call-template name="fatal">
<xsl:with-param name="m">OrganizationURL '<xsl:value-of select="."/>' does not start with acceptable prefix</xsl:with-param>
</xsl:call-template>
</xsl:template>


<!--
Checks for an IdP whose KeyDescriptor elements do not include a @use attribute.
This causes problems with the Shibboleth 1.3 SP prior to V1.3.1, which
Expand Down

0 comments on commit e376fbd

Please sign in to comment.