This is an automated email from the ASF dual-hosted git repository. clebertsuconic pushed a commit to branch 2.6.x in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/2.6.x by this push: new 39e0f15 ARTEMIS-2192 fix listener for LegacyLDAPSecuritySettingPlugin 39e0f15 is described below commit 39e0f152105ec99879f1e72cf07ab249f3ef7776 Author: Justin Bertram <jbert...@apache.org> AuthorDate: Thu Jan 24 10:34:14 2019 -0600 ARTEMIS-2192 fix listener for LegacyLDAPSecuritySettingPlugin (cherry picked from commit 693ea722f59cfd650d3ae418b1d60cd4552e2180) --- .../artemis/core/server/impl/LegacyLDAPSecuritySettingPlugin.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LegacyLDAPSecuritySettingPlugin.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LegacyLDAPSecuritySettingPlugin.java index e698476..3590702 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LegacyLDAPSecuritySettingPlugin.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LegacyLDAPSecuritySettingPlugin.java @@ -333,14 +333,14 @@ public class LegacyLDAPSecuritySettingPlugin implements SecuritySettingPlugin { 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); String rawDestinationType = rdn.getValue().toString(); if (rawDestinationType.toLowerCase().contains("queue")) { destinationType = "queue"; @@ -351,13 +351,13 @@ public class LegacyLDAPSecuritySettingPlugin implements SecuritySettingPlugin { logger.debug("\tDestination type: " + destinationType); } - rdn = rdns.get(1); + rdn = rdns.get(rdns.size() - 2); if (logger.isDebugEnabled()) { logger.debug("\tDestination name: " + rdn.getValue()); } destination = rdn.getValue().toString(); - rdn = rdns.get(2); + rdn = rdns.get(rdns.size() - 1); if (logger.isDebugEnabled()) { logger.debug("\tPermission type: " + rdn.getValue()); }