[cpp-sp COMMIT] in /branches/REL_2: adfs/adfs.cpp shibsp/Makefile.am shibsp/attribute/DOMAttributeDecoder.cpp shibsp/...

noreply at shibboleth.net noreply at shibboleth.net
Fri Jan 27 02:44:20 GMT 2012


Author: scantor
Date: Fri Jan 27 02:44:20 2012
New Revision: 3562

URL: http://svn.shibboleth.net/view/cpp-sp?rev=3562&view=rev
Log:
https://issues.shibboleth.net/jira/browse/SSPCPP-339

Modified:
    branches/REL_2/adfs/adfs.cpp
    branches/REL_2/shibsp/Makefile.am
    branches/REL_2/shibsp/attribute/DOMAttributeDecoder.cpp
    branches/REL_2/shibsp/attribute/resolver/AttributeExtractor.h
    branches/REL_2/shibsp/attribute/resolver/impl/ChainingAttributeExtractor.cpp
    branches/REL_2/shibsp/attribute/resolver/impl/MetadataAttributeExtractor.cpp
    branches/REL_2/shibsp/handler/AssertionConsumerService.h
    branches/REL_2/shibsp/handler/impl/AssertionConsumerService.cpp
    branches/REL_2/shibsp/handler/impl/SAML1Consumer.cpp
    branches/REL_2/shibsp/handler/impl/SAML2Consumer.cpp
    branches/REL_2/shibsp/impl/XMLServiceProvider.cpp
    branches/REL_2/shibsp/shibsp.vcxproj
    branches/REL_2/shibsp/shibsp.vcxproj.filters

Modified: branches/REL_2/adfs/adfs.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/adfs/adfs.cpp?rev=3562&r1=3561&r2=3562&view=diff
==============================================================================
--- branches/REL_2/adfs/adfs.cpp (original)
+++ branches/REL_2/adfs/adfs.cpp Fri Jan 27 02:44:20 2012
@@ -763,6 +763,7 @@
     scoped_ptr<ResolutionContext> ctx(
         resolveAttributes(
             application,
+            &httpRequest,
             policy.getIssuerMetadata(),
             m_protocol.get(),
             saml1name,

Modified: branches/REL_2/shibsp/Makefile.am
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/Makefile.am?rev=3562&r1=3561&r2=3562&view=diff
==============================================================================
--- branches/REL_2/shibsp/Makefile.am (original)
+++ branches/REL_2/shibsp/Makefile.am Fri Jan 27 02:44:20 2012
@@ -211,6 +211,7 @@
 	attribute/resolver/impl/ChainingAttributeExtractor.cpp \
 	attribute/resolver/impl/DelegationAttributeExtractor.cpp \
 	attribute/resolver/impl/KeyDescriptorAttributeExtractor.cpp \
+    attribute/resolver/impl/MetadataAttributeExtractor.cpp \
 	attribute/resolver/impl/XMLAttributeExtractor.cpp \
 	binding/impl/ArtifactResolver.cpp \
 	binding/impl/SOAPClient.cpp \

Modified: branches/REL_2/shibsp/attribute/DOMAttributeDecoder.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/attribute/DOMAttributeDecoder.cpp?rev=3562&r1=3561&r2=3562&view=diff
==============================================================================
--- branches/REL_2/shibsp/attribute/DOMAttributeDecoder.cpp (original)
+++ branches/REL_2/shibsp/attribute/DOMAttributeDecoder.cpp Fri Jan 27 02:44:20 2012
@@ -96,13 +96,12 @@
 {
     Category& log = Category::getInstance(SHIBSP_LOGCAT".AttributeDecoder.DOM");
 
-    if (!xmlObject || !XMLString::equals(saml1::Attribute::LOCAL_NAME, xmlObject->getElementQName().getLocalPart())) {
-        log.warn("XMLObject type not recognized by DOMAttributeDecoder, no values returned");
+    if (!xmlObject)
         return nullptr;
-    }
 
     auto_ptr<ExtensibleAttribute> attr(new ExtensibleAttribute(ids, m_formatter.c_str()));
     DDF dest = attr->getValues();
+    vector<XMLObject*> genericObjectWrapper;    // used to support stand-alone object decoding
     vector<XMLObject*>::const_iterator v,stop;
 
     const saml2::Attribute* saml2attr = dynamic_cast<const saml2::Attribute*>(xmlObject);
@@ -133,8 +132,10 @@
             }
         }
         else {
-            log.warn("XMLObject type not recognized by DOMAttributeDecoder, no values returned");
-            return nullptr;
+            log.debug("decoding arbitrary XMLObject type (%s)", xmlObject->getElementQName().toString().c_str());
+            genericObjectWrapper.push_back(const_cast<XMLObject*>(xmlObject));
+            v = genericObjectWrapper.begin();
+            stop = genericObjectWrapper.end();
         }
     }
 
@@ -146,7 +147,7 @@
                 dest.add(converted);
         }
         else
-            log.warn("skipping AttributeValue without a backing DOM");
+            log.warn("skipping XMLObject without a backing DOM");
     }
 
     return dest.integer() ? _decode(attr.release()) : nullptr;
@@ -194,7 +195,7 @@
     DOMElement* child = XMLHelper::getFirstChildElement(e);
     if (!child && e->hasChildNodes() && e->getFirstChild()->getNodeType() == DOMNode::TEXT_NODE) {
         // Attach a _text member if a text node is present.
-        obj.addmember("_string").string(toUTF8(e->getFirstChild()->getNodeValue(), true), false);
+        obj.addmember("_string").string(toUTF8(e->getFirstChild()->getTextContent(), true), false);
     }
     else {
         while (child) {

Modified: branches/REL_2/shibsp/attribute/resolver/AttributeExtractor.h
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/attribute/resolver/AttributeExtractor.h?rev=3562&r1=3561&r2=3562&view=diff
==============================================================================
--- branches/REL_2/shibsp/attribute/resolver/AttributeExtractor.h (original)

[... 800 lines stripped ...]


More information about the commits mailing list