activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] michaelandrepearce commented on a change in pull request #2516: ARTEMIS-2192 fix listener for LegacyLDAPSecuritySettingPlugin
Date Thu, 24 Jan 2019 17:40:07 GMT
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_r250706777
 
 

 ##########
 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:
   Hands up this isnt something im super hot on, and im not entirely sure what this code is
doing  and what expected results or ldap setup must be followed (so please choose to ignore
this)
   
   but i do know from LDAP its possible to get duplicate rdns, so what occurs if rdns is >
3 and a dn is duplicated
   
   e.g.
   
   uid=john.doe,ou=People,dc=example,dc=com
   
   dc is twice here, what do you need? also would mean you may miss the dn you do want maybe
the in this case, would be uid.
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message