[cpp-sp] branch main updated: SPPCPP-909 - Segfault in shibd on Empty Location

Scott Cantor cantor.2 at osu.edu
Tue Dec 1 16:48:44 UTC 2020


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

scantor pushed a commit to branch main
in repository cpp-sp.

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

The following commit(s) were added to refs/heads/main by this push:
       new  cf2c99e8  SPPCPP-909 - Segfault in shibd on Empty Location
cf2c99e8 is described below

commit cf2c99e879c548e8c99b9aa6ad78bcbbf0c611c6
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Dec 1 11:48:05 2020 -0500

    SPPCPP-909 - Segfault in shibd on Empty Location
    
    https://issues.shibboleth.net/jira/browse/SSPCPP-909
---
 shibsp/impl/XMLApplication.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/shibsp/impl/XMLApplication.cpp b/shibsp/impl/XMLApplication.cpp
index acbc9394..1111980b 100644
--- a/shibsp/impl/XMLApplication.cpp
+++ b/shibsp/impl/XMLApplication.cpp
@@ -552,8 +552,8 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
             boost::shared_ptr<Handler> handler;
             if (XMLString::equals(child->getLocalName(), _AssertionConsumerService)) {
                 string bindprop(XMLHelper::getAttrString(child, nullptr, Binding));
-                if (bindprop.empty()) {
-                    log.error("AssertionConsumerService element has no Binding attribute, skipping it...");
+                if (bindprop.empty() || !*child->getAttributeNS(nullptr, Location)) {
+                    log.error("AssertionConsumerService element has empty Binding or Location attribute, skipping it...");
                     child = XMLHelper::getNextSiblingElement(child);
                     continue;
                 }
@@ -618,8 +618,8 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
             }
             else if (XMLString::equals(child->getLocalName(), _ArtifactResolutionService)) {
                 string bindprop(XMLHelper::getAttrString(child, nullptr, Binding));
-                if (bindprop.empty()) {
-                    log.error("ArtifactResolutionService element has no Binding attribute, skipping it...");
+                if (bindprop.empty() || !*child->getAttributeNS(nullptr, Location)) {
+                    log.error("ArtifactResolutionService element has empty Binding or Location attribute, skipping it...");
                     child = XMLHelper::getNextSiblingElement(child);
                     continue;
                 }
@@ -641,8 +641,8 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
             }
             else if (XMLString::equals(child->getLocalName(), _SingleLogoutService)) {
                 string bindprop(XMLHelper::getAttrString(child, nullptr, Binding));
-                if (bindprop.empty()) {
-                    log.error("SingleLogoutService element has no Binding attribute, skipping it...");
+                if (bindprop.empty() || !*child->getAttributeNS(nullptr, Location)) {
+                    log.error("SingleLogoutService element has empty Binding or Location attribute, skipping it...");
                     child = XMLHelper::getNextSiblingElement(child);
                     continue;
                 }
@@ -652,8 +652,8 @@ void XMLApplication::doHandlers(const ProtocolProvider* pp, const DOMElement* e,
             }
             else if (XMLString::equals(child->getLocalName(), _ManageNameIDService)) {
                 string bindprop(XMLHelper::getAttrString(child, nullptr, Binding));
-                if (bindprop.empty()) {
-                    log.error("ManageNameIDService element has no Binding attribute, skipping it...");
+                if (bindprop.empty() || !*child->getAttributeNS(nullptr, Location)) {
+                    log.error("ManageNameIDService element has empty Binding or Location attribute, skipping it...");
                     child = XMLHelper::getNextSiblingElement(child);
                     continue;
                 }

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


More information about the commits mailing list