From 9c33d5017d757870ecad121e607b2b3fd5e96c93 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Mon, 3 Jan 2011 13:51:59 +0000
Subject: [PATCH] saml: The Destination attribute is not required on unsigned
 messages.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2694 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/saml/lib/Message.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/saml/lib/Message.php b/modules/saml/lib/Message.php
index 6be055d21..eb286dac0 100644
--- a/modules/saml/lib/Message.php
+++ b/modules/saml/lib/Message.php
@@ -492,7 +492,7 @@ class sspmod_saml_Message {
 		/* Validate Response-element destination. */
 		$currentURL = SimpleSAML_Utilities::selfURLNoQuery();
 		$msgDestination = $response->getDestination();
-		if ($msgDestination !== $currentURL) {
+		if ($msgDestination !== NULL && $msgDestination !== $currentURL) {
 			throw new Exception('Destination in response doesn\'t match the current URL. Destination is "' .
 				$msgDestination . '", current URL is "' . $currentURL . '".');
 		}
-- 
GitLab