Refuse to process handlers with no Location.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 17 May 2010 01:06:31 +0000 (01:06 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 17 May 2010 01:06:31 +0000 (01:06 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@3256 cb58f699-b61c-0410-a6fe-9272a202ed29

shibsp/impl/XMLServiceProvider.cpp

index c7efee5..d052a9e 100644 (file)
@@ -632,9 +632,13 @@ XMLApplication::XMLApplication(
         bool hardACS=false, hardSessionInit=false, hardArt=false;
         const DOMElement* child = sessions ? XMLHelper::getFirstChildElement(sessions->getElement()) : nullptr;
         while (child) {
+            if (!child->hasAttributeNS(nullptr, Location)) {
+                auto_ptr_char hclass(child->getLocalName());
+                log.error("%s handler with no Location property cannot be processed", hclass.get());
+                child = XMLHelper::getNextSiblingElement(child);
+                continue;
+            }
             try {
-                // A handler is based on the Binding property in conjunction with the element name.
-                // If it's an ACS or SI, also handle index/id mappings and defaulting.
                 if (XMLString::equals(child->getLocalName(),_AssertionConsumerService)) {
                     auto_ptr_char bindprop(child->getAttributeNS(nullptr,Binding));
                     if (!bindprop.get() || !*(bindprop.get())) {