michaelandrepearce commented on a change in pull request #2516: ARTEMIS-2192 
fix listener for LegacyLDAPSecuritySettingPlugin
URL: https://github.com/apache/activemq-artemis/pull/2516#discussion_r250764887
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LegacyLDAPSecuritySettingPlugin.java
 ##########
 @@ -333,14 +333,14 @@ private void processSearchResult(Map<String, Set<Role>> 
securityRoles,
       String destination = null;
       String destinationType = "unknown";
       List<Rdn> rdns = searchResultLdapName.getRdns();
-      if (rdns.size() != 3) {
+      if (rdns.size() < 3) {
          if (logger.isDebugEnabled()) {
             logger.debug("\tSkipping unexpected search result with " + 
rdns.size() + " RDNs.");
          }
          return;
       }
       // we can count on the RNDs being in order from right to left
-      Rdn rdn = rdns.get(0);
+      Rdn rdn = rdns.get(rdns.size() - 3);
 
 Review comment:
   fair enough

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to