Skip to content
Snippets Groups Projects
Commit 4ac34cf2 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

fix exception with fingerprint mismatch. Fix discovery of HTTP-HOST when Host:...

fix exception with fingerprint mismatch. Fix discovery of HTTP-HOST when Host: header contains port number.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@12 44740490-163a-0410-bde0-09ae8108e29a
parent ea332ebe
No related branches found
No related tags found
No related merge requests found
......@@ -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 . ']');
}
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment