[java-identity-provider] branch master updated: OSJ-154: Marshalling an assertion into a new document does not preserve its IDness

Brent Putman putmanb at georgetown.edu
Thu May 28 03:50:45 UTC 2020


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

putmanb pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=503a9f8b286069e0fa32a2fb8d0b04830a01df86

The following commit(s) were added to refs/heads/master by this push:
       new  503a9f8b2 OSJ-154: Marshalling an assertion into a new document does not preserve its IDness
503a9f8b2 is described below

commit 503a9f8b286069e0fa32a2fb8d0b04830a01df86
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Fri May 22 21:02:42 2020 -0400

    OSJ-154: Marshalling an assertion into a new document does not preserve its IDness
---
 .../xmlobject/impl/KeyAuthorityMarshaller.java     | 24 +++++-----------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/KeyAuthorityMarshaller.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/KeyAuthorityMarshaller.java
index 3930d72c9..f307b6a7e 100644
--- a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/KeyAuthorityMarshaller.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/xmlobject/impl/KeyAuthorityMarshaller.java
@@ -17,21 +17,16 @@
 
 package net.shibboleth.idp.saml.xmlobject.impl;
 
-import java.util.Map.Entry;
-
 import javax.annotation.concurrent.ThreadSafe;
-import javax.xml.namespace.QName;
-
-import net.shibboleth.idp.saml.xmlobject.KeyAuthority;
-import net.shibboleth.utilities.java.support.xml.AttributeSupport;
 
 import org.opensaml.core.xml.XMLObject;
-import org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport;
 import org.opensaml.core.xml.io.AbstractXMLObjectMarshaller;
 import org.opensaml.core.xml.io.MarshallingException;
-import org.w3c.dom.Attr;
+import org.opensaml.core.xml.util.XMLObjectSupport;
 import org.w3c.dom.Element;
 
+import net.shibboleth.idp.saml.xmlobject.KeyAuthority;
+
 /** Marshaller for {@link KeyAuthority}. */
 @ThreadSafe
 public class KeyAuthorityMarshaller extends AbstractXMLObjectMarshaller {
@@ -45,16 +40,7 @@ public class KeyAuthorityMarshaller extends AbstractXMLObjectMarshaller {
                     .toString());
         }
 
-        Attr attr;
-        for (final Entry<QName, String> entry : keyAuthority.getUnknownAttributes().entrySet()) {
-            attr = AttributeSupport.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
-            attr.setValue(entry.getValue());
-            domElement.setAttributeNodeNS(attr);
-            if (XMLObjectProviderRegistrySupport.isIDAttribute(entry.getKey())
-                    || keyAuthority.getUnknownAttributes().isIDAttribute(entry.getKey())) {
-                attr.getOwnerElement().setIdAttributeNode(attr, true);
-            }
-        }
-
+        XMLObjectSupport.marshallAttributeMap(keyAuthority.getUnknownAttributes(), domElement);
     }
+
 }
\ No newline at end of file

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


More information about the commits mailing list