[cpp-opensaml] branch master updated: Explicit check for empty metadata document.
Scott Cantor
cantor.2 at osu.edu
Tue Jul 10 20:13:49 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-opensaml.git;a=commit;h=70b2e753307f4e9dc0bafbfde5bd857b686f44fa
The following commit(s) were added to refs/heads/master by this push:
new 70b2e75 Explicit check for empty metadata document.
70b2e75 is described below
commit 70b2e753307f4e9dc0bafbfde5bd857b686f44fa
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jul 10 20:13:29 2018 -0400
Explicit check for empty metadata document.
---
saml/saml2/metadata/impl/XMLMetadataProvider.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp
index e54e0b1..9ab04ec 100644
--- a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp
@@ -186,6 +186,9 @@ pair<bool,DOMElement*> XMLMetadataProvider::load(bool backup, string backingFile
// If we own it, wrap it for now.
XercesJanitor<DOMDocument> docjanitor(raw.first ? raw.second->getOwnerDocument() : nullptr);
+ if (!raw.second)
+ throw MetadataException("XML document was empty");
+
// Unmarshall objects, binding the document.
scoped_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(raw.second, raw.first));
docjanitor.release();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list