From: Scott Cantor Date: Thu, 13 Aug 2009 18:53:21 +0000 (+0000) Subject: Apply manual validators even when schema was used. X-Git-Tag: 2.2.1 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=commitdiff_plain;h=refs%2Ftags%2F2.2.1 Apply manual validators even when schema was used. --- diff --git a/saml/saml1/binding/impl/SAML1POSTDecoder.cpp b/saml/saml1/binding/impl/SAML1POSTDecoder.cpp index e0191f7..923d61b 100644 --- a/saml/saml1/binding/impl/SAML1POSTDecoder.cpp +++ b/saml/saml1/binding/impl/SAML1POSTDecoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -109,8 +109,7 @@ XMLObject* SAML1POSTDecoder::decode( if (!response) throw BindingException("Decoded message was not a SAML 1.x Response."); - if (!policy.getValidating()) - SchemaValidators.validate(response); + SchemaValidators.validate(response); pair minor = response->getMinorVersion(); extractMessageDetails( diff --git a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp index d60dced..74c1960 100644 --- a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp +++ b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,8 +98,7 @@ XMLObject* SAML1SOAPDecoder::decode( if (!env) throw BindingException("Decoded message was not a SOAP 1.1 Envelope."); - if (!policy.getValidating()) - SchemaValidators.validate(env); + SchemaValidators.validate(env); Body* body = env->getBody(); if (body && body->hasChildren()) { diff --git a/saml/saml2/binding/impl/SAML2ECPDecoder.cpp b/saml/saml2/binding/impl/SAML2ECPDecoder.cpp index 8a0acee..671e0e7 100644 --- a/saml/saml2/binding/impl/SAML2ECPDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2ECPDecoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -99,8 +99,7 @@ XMLObject* SAML2ECPDecoder::decode( if (!env) throw BindingException("Decoded message was not a SOAP 1.1 Envelope."); - if (!policy.getValidating()) - SchemaValidators.validate(env); + SchemaValidators.validate(env); Body* body = env->getBody(); if (body && body->hasChildren()) { diff --git a/saml/saml2/binding/impl/SAML2POSTDecoder.cpp b/saml/saml2/binding/impl/SAML2POSTDecoder.cpp index 43c9a2d..99a5f3c 100644 --- a/saml/saml2/binding/impl/SAML2POSTDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2POSTDecoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -122,8 +122,7 @@ XMLObject* SAML2POSTDecoder::decode( root = static_cast(request); } - if (!policy.getValidating()) - SchemaValidators.validate(root); + SchemaValidators.validate(root); // Run through the policy. extractMessageDetails(*root, genericRequest, samlconstants::SAML20P_NS, policy); diff --git a/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp b/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp index 6d6ce6d..ddffd3b 100644 --- a/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -140,8 +140,7 @@ XMLObject* SAML2RedirectDecoder::decode( root = static_cast(request); } - if (!policy.getValidating()) - SchemaValidators.validate(root); + SchemaValidators.validate(root); // Run through the policy. extractMessageDetails(*root, genericRequest, samlconstants::SAML20P_NS, policy); diff --git a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp index e006a9e..346aa99 100644 --- a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,8 +98,7 @@ XMLObject* SAML2SOAPDecoder::decode( if (!env) throw BindingException("Decoded message was not a SOAP 1.1 Envelope."); - if (!policy.getValidating()) - SchemaValidators.validate(env); + SchemaValidators.validate(env); Body* body = env->getBody(); if (body && body->hasChildren()) {