[cpp-sp] branch master updated: Add a defaulted hook to turn off DTD processing.
Scott Cantor
cantor.2 at osu.edu
Mon Jun 6 12:13:18 EDT 2016
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-sp.
The following commit(s) were added to refs/heads/master by this push:
new a4afca9 Add a defaulted hook to turn off DTD processing.
a4afca9 is described below
commit a4afca914cffe9689d42c4edd8330094cfc175c0
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Jun 6 12:13:02 2016 -0400
Add a defaulted hook to turn off DTD processing.
---
schemas/shibboleth-2.0-native-sp-config.xsd | 1 +
shibsp/impl/XMLServiceProvider.cpp | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/schemas/shibboleth-2.0-native-sp-config.xsd b/schemas/shibboleth-2.0-native-sp-config.xsd
index ce7f468..8ff5838 100644
--- a/schemas/shibboleth-2.0-native-sp-config.xsd
+++ b/schemas/shibboleth-2.0-native-sp-config.xsd
@@ -823,6 +823,7 @@
<attribute name="langFromClient" type="boolean"/>
<attribute name="langPriority" type="conf:listOfStrings"/>
<attribute name="contactPriority" type="conf:listOfStrings"/>
+ <attribute name="disableDTD" type="boolean"/>
<anyAttribute namespace="##other" processContents="lax"/>
</complexType>
</element>
diff --git a/shibsp/impl/XMLServiceProvider.cpp b/shibsp/impl/XMLServiceProvider.cpp
index 20f94f8..89157de 100644
--- a/shibsp/impl/XMLServiceProvider.cpp
+++ b/shibsp/impl/XMLServiceProvider.cpp
@@ -2071,6 +2071,13 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, XMLConfig* outer,
// Much of the processing can only occur on the first instantiation.
if (first) {
+ // Disable DTD processing by default if Xerces happens to be new enough,
+ // but not so new that we can control it with parser settings.
+ pair<bool,bool> disableDTD = getBool("disableDTD");
+ if (!disableDTD.first || disableDTD.second) {
+ putenv("XERCES_DISABLE_DTD=1");
+ }
+
// Set clock skew.
pair<bool,unsigned int> skew=getUnsignedInt("clockSkew");
if (skew.first)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list