You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2020/06/13 14:10:28 UTC

[GitHub] [cxf-fediz] amergey commented on a change in pull request #56: fix Attribute claim parsing when attribute name contains a space

amergey commented on a change in pull request #56:
URL: https://github.com/apache/cxf-fediz/pull/56#discussion_r439741924



##########
File path: plugins/core/src/main/java/org/apache/cxf/fediz/core/saml/SAMLTokenValidator.java
##########
@@ -332,12 +334,18 @@ public TokenValidatorResponse validateAndProcessToken(TokenValidatorRequest requ
                 // Value of Attribute Name not fully qualified
                 // if NameFormat is http://schemas.xmlsoap.org/ws/2005/05/identity/claims
                 // but ClaimType value must be fully qualified as Namespace attribute goes away
-                URI attrName = URI.create(attribute.getName());
+                String attributeName;
+                try {
+                    attributeName = URLEncoder.encode(attribute.getName(), "UTF-8");
+                } catch (UnsupportedEncodingException e) {
+                    attributeName = attribute.getName();
+                }
+                URI attrName = URI.create(attributeName);

Review comment:
       I have made changes according to your comment, also add similar fix for saml v1 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org