Add XML validation flag to policy.
[shibboleth/cpp-opensaml.git] / saml / saml2 / binding / impl / SAML2RedirectDecoder.cpp
index 489f709..63a324a 100644 (file)
@@ -106,7 +106,7 @@ XMLObject* SAML2RedirectDecoder::decode(
     XMLString::release(&decoded);
     
     // Parse and bind the document into an XMLObject.
-    DOMDocument* doc = (m_validate ? XMLToolingConfig::getConfig().getValidatingParser()
+    DOMDocument* doc = (policy.getValidating() ? XMLToolingConfig::getConfig().getValidatingParser()
         : XMLToolingConfig::getConfig().getParser()).parse(s);
     XercesJanitor<DOMDocument> janitor(doc);
     auto_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(doc->getDocumentElement(), true));
@@ -125,7 +125,7 @@ XMLObject* SAML2RedirectDecoder::decode(
         root = static_cast<saml2::RootObject*>(request);
     }
     
-    if (!m_validate)
+    if (!policy.getValidating())
         SchemaValidators.validate(xmlObject.get());
     
     // Run through the policy.