You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by jw...@apache.org on 2005/01/14 16:17:38 UTC
svn commit: r125171 - /lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/ldap/LDAPUser.java
Author: jwkaltz
Date: Fri Jan 14 07:17:36 2005
New Revision: 125171
URL: http://svn.apache.org/viewcvs?view=rev&rev=125171
Log:
commented out superfluous sanity check, to avoid problems with MS Active
Directory
Modified:
lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/ldap/LDAPUser.java
Modified: lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/ldap/LDAPUser.java
Url: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/ldap/LDAPUser.java?view=diff&rev=125171&p1=lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/ldap/LDAPUser.java&r1=125170&p2=lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/ldap/LDAPUser.java&r2=125171
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/ldap/LDAPUser.java (original)
+++ lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/ac/ldap/LDAPUser.java Fri Jan 14 07:17:36 2005
@@ -454,10 +454,21 @@
if (results != null && results.hasMore()) {
result = (SearchResult)results.next();
- // sanity check
- if (results.hasMore()) {
- log.warn("Found more than one entry in the directory for user " + userId + ". You probably should deactivate recursive searches. The first entry was used as a work-around.");
- }
+ // sanity check: if more than one entry is returned
+ // for a user-id, then the directory is probably flawed,
+ // so it would be nice to warn the administrator.
+ //
+ // This block is commented out for now, because of possible
+ // side-effects, such as unexpected exceptions.
+// try {
+// if (results.hasMore()) {
+// log.warn("Found more than one entry in the directory for user " + userId + ". You probably should deactivate recursive searches. The first entry was used as a work-around.");
+// }
+// }
+// catch (javax.naming.PartialResultException e) {
+// if (log.isDebugEnabled())
+// log.debug("Catching and ignoring PartialResultException, as this means LDAP server does not support our sanity check");
+// }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org