Apply manual validators even when schema was used. 2.2.1
authorScott Cantor <cantor.2@osu.edu>
Thu, 13 Aug 2009 18:53:21 +0000 (18:53 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 13 Aug 2009 18:53:21 +0000 (18:53 +0000)
saml/saml1/binding/impl/SAML1POSTDecoder.cpp
saml/saml1/binding/impl/SAML1SOAPDecoder.cpp
saml/saml2/binding/impl/SAML2ECPDecoder.cpp
saml/saml2/binding/impl/SAML2POSTDecoder.cpp
saml/saml2/binding/impl/SAML2RedirectDecoder.cpp
saml/saml2/binding/impl/SAML2SOAPDecoder.cpp

index e0191f7..923d61b 100644 (file)
@@ -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<bool,int> minor = response->getMinorVersion();
     extractMessageDetails(
index d60dced..74c1960 100644 (file)
@@ -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()) {
index 8a0acee..671e0e7 100644 (file)
@@ -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()) {
index 43c9a2d..99a5f3c 100644 (file)
@@ -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<saml2::RootObject*>(request);
     }
     
-    if (!policy.getValidating())
-        SchemaValidators.validate(root);
+    SchemaValidators.validate(root);
 
     // Run through the policy.
     extractMessageDetails(*root, genericRequest, samlconstants::SAML20P_NS, policy);
index 6d6ce6d..ddffd3b 100644 (file)
@@ -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<saml2::RootObject*>(request);
     }
 
-    if (!policy.getValidating())
-        SchemaValidators.validate(root);
+    SchemaValidators.validate(root);
 
     // Run through the policy.
     extractMessageDetails(*root, genericRequest, samlconstants::SAML20P_NS, policy);
index e006a9e..346aa99 100644 (file)
@@ -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()) {