diff --git a/lib/SimpleSAML/XML/MetaDataStore.php b/lib/SimpleSAML/XML/MetaDataStore.php index 8d15a3ed8c71c18a7eb3c9988af71d295b19d8ae..5f3d3a72d82264e3dbe4f702fcbfe886dfcd1811 100644 --- a/lib/SimpleSAML/XML/MetaDataStore.php +++ b/lib/SimpleSAML/XML/MetaDataStore.php @@ -66,6 +66,12 @@ class SimpleSAML_XML_MetaDataStore { $this->load($set); } $currenthost = $_SERVER['HTTP_HOST']; + + if(strstr($currenthost, ":")) { + $currenthostdecomposed = explode(":", $currenthost); + $currenthost = $currenthostdecomposed[0]; + } + if (!isset($this->hostmap[$set])) { throw new Exception('No default entities defined for metadata set [' . $set . ']'); } diff --git a/lib/SimpleSAML/XML/SAML20/AuthnResponse.php b/lib/SimpleSAML/XML/SAML20/AuthnResponse.php index 1e7b18920d997c4d09658853ab8c94958da09c73..2a46accc3d3aae4202ac3fa7a1989c7fd8f4c385 100644 --- a/lib/SimpleSAML/XML/SAML20/AuthnResponse.php +++ b/lib/SimpleSAML/XML/SAML20/AuthnResponse.php @@ -141,7 +141,7 @@ class SimpleSAML_XML_SAML20_AuthnResponse extends SimpleSAML_XML_AuthnResponse { } if ($fingerprint != $issuerFingerprint) { - echo "Expecting fingerprint $issuerFingerprint but got fingerprint $fingerprint .st"; + throw new Exception("Expecting fingerprint $issuerFingerprint but got fingerprint $fingerprint ."); } return ($fingerprint == $issuerFingerprint);