manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1325675 - /incubator/lcf/branches/CONNECTORS-460/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java
Date Fri, 13 Apr 2012 09:12:59 GMT
Author: kwright
Date: Fri Apr 13 09:12:58 2012
New Revision: 1325675

URL: http://svn.apache.org/viewvc?rev=1325675&view=rev
Log:
Handle the empty suffix case properly

Modified:
    incubator/lcf/branches/CONNECTORS-460/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java

Modified: incubator/lcf/branches/CONNECTORS-460/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-460/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java?rev=1325675&r1=1325674&r2=1325675&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-460/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java
(original)
+++ incubator/lcf/branches/CONNECTORS-460/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java
Fri Apr 13 09:12:58 2012
@@ -288,7 +288,7 @@ public class ActiveDirectoryAuthority ex
     for (DCRule rule : dCRules)
     {
       String suffix = rule.getSuffix();
-      if (domainPart.toLowerCase().endsWith(suffix.toLowerCase()) &&
+      if (suffix.length() == 0 || domainPart.toLowerCase().endsWith(suffix.toLowerCase())
&&
         (suffix.length() == domainPart.length() || domainPart.charAt(domainPart.length()-suffix.length())
== '.'))
       {
         domainController = rule.getDomainControllerName();



Mime
View raw message