Move policy execution above the destination check.
authorScott Cantor <cantor.2@osu.edu>
Mon, 5 Feb 2007 16:05:49 +0000 (16:05 +0000)
committerScott Cantor <cantor.2@osu.edu>
Mon, 5 Feb 2007 16:05:49 +0000 (16:05 +0000)
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();
 }