From: cantor Date: Mon, 5 Feb 2007 16:05:21 +0000 (+0000) Subject: Move policy execution above the destination check. X-Git-Tag: 2.4.1~443 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fopensaml2.git;a=commitdiff_plain;h=83bca2b2337e2e2f7b7bafc5541fecbd36b20d7f Move policy execution above the destination check. git-svn-id: https://svn.middleware.georgetown.edu/cpp-opensaml2/trunk@171 fb386ef7-a10c-0410-8ebf-fd3f8e989ab0 --- diff --git a/saml/saml2/binding/impl/SAML2POSTDecoder.cpp b/saml/saml2/binding/impl/SAML2POSTDecoder.cpp index 414e24b..5f763f5 100644 --- a/saml/saml2/binding/impl/SAML2POSTDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2POSTDecoder.cpp @@ -113,6 +113,9 @@ XMLObject* SAML2POSTDecoder::decode( if (!m_validate) SchemaValidators.validate(xmlObject.get()); + + // Run through the policy. + policy.evaluate(*root, &genericRequest); // Check destination URL. auto_ptr_char dest(request ? request->getDestination() : response->getDestination()); @@ -126,7 +129,5 @@ XMLObject* SAML2POSTDecoder::decode( throw BindingException("SAML message delivered with POST to incorrect server URL."); } - // Run through the policy. - policy.evaluate(*root, &genericRequest); return xmlObject.release(); }