handavid commented on code in PR #1523:
URL: https://github.com/apache/knox/pull/1523#discussion_r4622402505


##########
gateway-server/src/main/java/org/apache/knox/gateway/services/ldap/backend/LdapProxyBackend.java:
##########
@@ -586,8 +769,8 @@ public List<Entry> search(String searchBase, SearchScope 
searchScope, String fil
         try {
             connection = getConnection();
             List<Entry> results = new ArrayList<>();
-            boolean memberOfRequested = isAttributeRequested(attributes, 
proxyEntryGroupMembershipAttributeType, schemaManager);
-            String[] remoteAttributes = memberOfRequested && useMemberOf ? 
ALL_ATTRIBUTES_AND_MEMBEROF : ALL_ATTRIBUTES;
+            boolean memberOfRequested = isAttributeRequested(attributes, 
MEMBER_OF, schemaManager);
+            String[] remoteAttributes = memberOfRequested && useMemberOf ? 
addMemberOfAttribute(attributes) : attributes;

Review Comment:
   thanks! I've fixed this and added a test.
   I can't assert that the extra attributes don't leak in a unit test. 
Attributes that are not requested are removed in the SchemaInterceptor. 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to