Move policy execution above the destination check.
authorcantor <cantor@fb386ef7-a10c-0410-8ebf-fd3f8e989ab0>
Mon, 5 Feb 2007 16:05:49 +0000 (16:05 +0000)
committercantor <cantor@fb386ef7-a10c-0410-8ebf-fd3f8e989ab0>
Mon, 5 Feb 2007 16:05:49 +0000 (16:05 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-opensaml2/trunk@172 fb386ef7-a10c-0410-8ebf-fd3f8e989ab0

saml/saml1/binding/impl/SAML1POSTDecoder.cpp

index 64cc627..7815c19 100644 (file)
@@ -99,6 +99,9 @@ XMLObject* SAML1POSTDecoder::decode(
 
     if (!m_validate)
         SchemaValidators.validate(xmlObject.get());
+
+    // Run through the policy.
+    policy.evaluate(*response, &genericRequest);
     
     // Check recipient URL.
     auto_ptr_char recipient(response->getRecipient());
@@ -112,8 +115,5 @@ XMLObject* SAML1POSTDecoder::decode(
         throw BindingException("SAML message delivered with POST to incorrect server URL.");
     }
     
-    // Run through the policy.
-    policy.evaluate(*response, &genericRequest);
-
     return xmlObject.release();
 }