ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1626811 - in /webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security: WSDocInfo.java message/token/UsernameToken.java processor/EncryptedAssertionProcessor.java util/WSSecurityUtil.java
Date Mon, 22 Sep 2014 15:41:25 GMT
Author: coheigea
Date: Mon Sep 22 15:41:24 2014
New Revision: 1626811

URL: http://svn.apache.org/r1626811
Log:
Some namespace enabled DOM calls


Conflicts:
	policy/src/main/java/org/apache/wss4j/policy/builders/SignedElementsBuilder.java
	src/main/java/org/apache/ws/security/WSDocInfo.java
	src/main/java/org/apache/ws/security/processor/ReferenceListProcessor.java
	src/main/java/org/apache/ws/security/util/WSSecurityUtil.java

Modified:
    webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/WSDocInfo.java
    webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/UsernameToken.java
    webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/processor/EncryptedAssertionProcessor.java
    webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/util/WSSecurityUtil.java

Modified: webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/WSDocInfo.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/WSDocInfo.java?rev=1626811&r1=1626810&r2=1626811&view=diff
==============================================================================
--- webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/WSDocInfo.java
(original)
+++ webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/WSDocInfo.java
Mon Sep 22 15:41:24 2014
@@ -158,8 +158,8 @@ public class WSDocInfo {
                 String samlId = elem.getAttributeNS(null, "AssertionID");
                 String samlId2 = elem.getAttributeNS(null, "ID");
                 if ((elem.hasAttributeNS(WSConstants.WSU_NS, "Id") && id.equals(cId))

-                    || (elem.hasAttribute("AssertionID") && id.equals(samlId))
-                    || (elem.hasAttribute("ID") && id.equals(samlId2))) {
+                    || (elem.hasAttributeNS(null, "AssertionID") && id.equals(samlId))
+                    || (elem.hasAttributeNS(null, "ID") && id.equals(samlId2))) {
                     return elem;
                 }
             }

Modified: webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/UsernameToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/UsernameToken.java?rev=1626811&r1=1626810&r2=1626811&view=diff
==============================================================================
--- webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/UsernameToken.java
(original)
+++ webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/message/token/UsernameToken.java
Mon Sep 22 15:41:24 2014
@@ -190,7 +190,7 @@ public class UsernameToken {
         }
         
         if (elementPassword != null) {
-            if (elementPassword.hasAttribute(WSConstants.PASSWORD_TYPE_ATTR)) {
+            if (elementPassword.hasAttributeNS(null, WSConstants.PASSWORD_TYPE_ATTR)) {
                 passwordType = elementPassword.getAttributeNS(null, WSConstants.PASSWORD_TYPE_ATTR);
             } else if (elementPassword.hasAttributeNS(
                 WSConstants.WSSE_NS, WSConstants.PASSWORD_TYPE_ATTR)

Modified: webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/processor/EncryptedAssertionProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/processor/EncryptedAssertionProcessor.java?rev=1626811&r1=1626810&r2=1626811&view=diff
==============================================================================
--- webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/processor/EncryptedAssertionProcessor.java
(original)
+++ webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/processor/EncryptedAssertionProcessor.java
Mon Sep 22 15:41:24 2014
@@ -58,7 +58,7 @@ public class EncryptedAssertionProcessor
         }
         
         // Type must be "Element" if specified
-        String typeStr = encryptedDataElement.getAttribute("Type");
+        String typeStr = encryptedDataElement.getAttributeNS(null, "Type");
         if (typeStr != null && !(WSConstants.ENC_NS + "Element").equals(typeStr))
{
             throw new WSSecurityException(
                 WSSecurityException.INVALID_SECURITY, "badElement", 

Modified: webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/util/WSSecurityUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/util/WSSecurityUtil.java?rev=1626811&r1=1626810&r2=1626811&view=diff
==============================================================================
--- webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/util/WSSecurityUtil.java
(original)
+++ webservices/wss4j/branches/1_6_x-fixes/src/main/java/org/apache/ws/security/util/WSSecurityUtil.java
Mon Sep 22 15:41:24 2014
@@ -409,8 +409,8 @@ public final class WSSecurityUtil {
             // start node processing at this point
             if (startNode.getNodeType() == Node.ELEMENT_NODE) {
                 Element se = (Element) startNode;
-                if ((se.hasAttribute("ID") && value.equals(se.getAttributeNS(null,
"ID")))
-                    || (se.hasAttribute("AssertionID") 
+                if ((se.hasAttributeNS(null, "ID") && value.equals(se.getAttributeNS(null,
"ID")))
+                    || (se.hasAttributeNS(null, "AssertionID") 
                         && value.equals(se.getAttributeNS(null, "AssertionID"))))
{
                     if (foundElement == null) {
                         foundElement = se; // Continue searching to find duplicates



Mime
View raw message