tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1069824 - in /tomcat/trunk: java/org/apache/catalina/realm/JNDIRealm.java webapps/docs/changelog.xml
Date Fri, 11 Feb 2011 14:49:41 GMT
Author: markt
Date: Fri Feb 11 14:49:41 2011
New Revision: 1069824

URL: http://svn.apache.org/viewvc?rev=1069824&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50751
Don't try to retrieve attributes if we don't need to. If anonymous bind is not allowed, the
login will always fail.

Modified:
    tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java?rev=1069824&r1=1069823&r2=1069824&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java Fri Feb 11 14:49:41 2011
@@ -1245,6 +1245,11 @@ public class JNDIRealm extends RealmBase
                                     String dn)
         throws NamingException {
 
+        // If no attributes are requested, no need to look for them
+        if (attrIds == null || attrIds.length > 0) {
+            return new User(username, dn, null, null);
+        }
+
         // Get required attributes from user entry
         Attributes attrs = null;
         try {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1069824&r1=1069823&r2=1069824&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Feb 11 14:49:41 2011
@@ -72,6 +72,11 @@
         point the response is committed when a writer is being used. (markt)
       </fix>
       <fix>
+        <bug>50751</bug>: When authenticating with the JNDI Realm, only attempt
+        to read user attributes from the directory if attributes are required.
+        (markt)
+      </fix>
+      <fix>
         <bug>50752</bug>: Fix typo in debug message in deprecated Embedded
         class. (markt)
       </fix>



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


Mime
View raw message