portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r597225 - /portals/jetspeed-2/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/ldap/AbstractLdapDao.java
Date Wed, 21 Nov 2007 21:56:54 GMT
Author: ate
Date: Wed Nov 21 13:56:53 2007
New Revision: 597225

URL: http://svn.apache.org/viewvc?rev=597225&view=rev
Log:
Fix for JS2-814: Ldap User DN is incorrectly calculated when search filterBase is empty
Patch provided by Dennis Dam, thanks!

Modified:
    portals/jetspeed-2/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/ldap/AbstractLdapDao.java

Modified: portals/jetspeed-2/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/ldap/AbstractLdapDao.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/ldap/AbstractLdapDao.java?rev=597225&r1=597224&r2=597225&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/ldap/AbstractLdapDao.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/ldap/AbstractLdapDao.java
Wed Nov 21 13:56:53 2007
@@ -207,8 +207,11 @@
         {
             SearchResult searchResult = (SearchResult) searchResults.next();
             userDn = searchResult.getName();
-            // FIXME: Does this work?
-            userDn += "," + StringUtils.replace(getSearchDomain(), "," + getRootContext(),
"");
+            String searchDomain = getSearchDomain();
+            if (searchDomain.length() > 0)
+            {
+                userDn += "," + StringUtils.replace(searchDomain, "," + getRootContext(),
"");
+            }
         }
         return userDn;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message