[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pki-devel] [PATCH] 003 Make pki group-member-show case insensitive

The patch makes the getGroupMember() call and therefore the REST call
admin/groups/{groupID}/members/{memberID} case insensitive. The member
id is returned in its canonical form.
From de981be73662568efc99bd5b3b37ca9ccdbd4aba Mon Sep 17 00:00:00 2001
From: Christian Heimes <cheimes redhat com>
Date: Mon, 15 Jun 2015 14:32:10 +0200
Subject: [PATCH] Make pki group-member-show case insensitive

Make the memberID argument of getGroupMember() case insensitive. The
groupID argument is already case insensitive. The groupID string is used
as CN element in an LDAP query, which is case insensitive by definition.

 .../cms/src/com/netscape/cms/servlet/admin/GroupMemberProcessor.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/base/server/cms/src/com/netscape/cms/servlet/admin/GroupMemberProcessor.java b/base/server/cms/src/com/netscape/cms/servlet/admin/GroupMemberProcessor.java
index 24b2421747d96823475124a50f095765fd9f6aae..f974db4250b0692f48ed65c557948c7b19dac06c 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/admin/GroupMemberProcessor.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/admin/GroupMemberProcessor.java
@@ -170,9 +170,9 @@ public class GroupMemberProcessor extends Processor {
             Enumeration<String> e = group.getMemberNames();
             while (e.hasMoreElements()) {
                 String memberName = e.nextElement();
-                if (!memberName.equals(memberID)) continue;
+                if (!memberName.equalsIgnoreCase(memberID)) continue;
-                GroupMemberData groupMemberData = createGroupMemberData(groupID, memberID);
+                GroupMemberData groupMemberData = createGroupMemberData(groupID, memberName);
                 return groupMemberData;

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]