[cpp-xmltooling] 02/02: SSPCPP-819 - XML MetadataProvider file= not recognized

Scott Cantor cantor.2 at osu.edu
Tue Jul 10 14:24:22 EDT 2018


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository cpp-xmltooling.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=faa215297582c31831823ac263b89d38f88f115f

commit faa215297582c31831823ac263b89d38f88f115f
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jul 10 14:23:10 2018 -0400

    SSPCPP-819 - XML MetadataProvider file= not recognized
    
    https://issues.shibboleth.net/jira/browse/SSPCPP-819
    
    Improved diagnostics when path or url are missing, and fixed
    a crash when there are no child elements.
---
 xmltooling/util/ReloadableXMLFile.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/xmltooling/util/ReloadableXMLFile.cpp b/xmltooling/util/ReloadableXMLFile.cpp
index cb0ee89..015f92f 100644
--- a/xmltooling/util/ReloadableXMLFile.cpp
+++ b/xmltooling/util/ReloadableXMLFile.cpp
@@ -233,8 +233,13 @@ ReloadableXMLFile::ReloadableXMLFile(const DOMElement* e, Category& log, bool st
         if (startReloadThread)
             startup();
     }
+    else if (e && e->hasChildNodes()) {
+        // TODO: what we want to do here is delegate a check to the subclasses to immediately check for the "right"
+        // child element so we can catch the deprecated syntax mistake here.
+        log.info("no resource url/path supplied, assuming inline configuration");
+    }
     else {
-        log.debug("no resource url/path supplied, will load inline configuration");
+        throw XMLToolingException("XML configuration resource missing url/path attributes and has no inline content");
     }
 
     m_id = XMLHelper::getAttrString(e, nullptr, id);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list