You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/01/13 11:37:53 UTC

svn commit: r898707 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/realm/JNDIRealm.java webapps/docs/changelog.xml

Author: markt
Date: Wed Jan 13 10:37:53 2010
New Revision: 898707

URL: http://svn.apache.org/viewvc?rev=898707&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48516
Prevent possible NPE in JNDIRealm when user does not exist
Patch provided by Kevin Conaway

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=898707&r1=898706&r2=898707&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 13 10:37:53 2010
@@ -189,10 +189,3 @@
   http://svn.apache.org/viewvc?rev=898527&view=rev
   +1: markt, kkolinko, rjung
   -1: 
-
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48516
-  Prevent possible NPE in JNDIRealm when user does not exist
-  Patch provided by Kevin Conaway
-  http://svn.apache.org/viewvc?rev=898558&view=rev
-  +1: markt, kkolinko, rjung
-  -1: 

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java?rev=898707&r1=898706&r2=898707&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java Wed Jan 13 10:37:53 2010
@@ -1924,8 +1924,12 @@
 
         User user = getUser(context, username);
 
-        return new GenericPrincipal(this, user.username, user.password ,
-                getRoles(context, user));
+        if (user != null) {
+            return new GenericPrincipal(this, user.username, user.password,
+                    getRoles(context, user));
+        }
+        
+        return null;
     }
 
     /**

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=898707&r1=898706&r2=898707&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Jan 13 10:37:53 2010
@@ -42,8 +42,8 @@
         specification. (markt)
       </add>
       <fix>
-        <bug>48345</bug>: Sessions timed out too early when using PersistentManager.
-        Patch provided by Keiichi Fujino. (markt)
+        <bug>48345</bug>: Sessions timed out too early when using
+        PersistentManager. Patch provided by Keiichi Fujino. (markt)
       </fix>
       <fix>
         <bug>48398</bug>: Make objects used as locks final to ensure correct
@@ -57,6 +57,10 @@
         <bug>48454</bug>: Ensure stderr is completely read before terminating
         the CGI process. Patch provided by Markus Grieder. (markt)
       </fix>
+      <fix>
+        <bug>48516</bug>: Prevent NPE in JNDIRealm if requested user does not
+        exist. Patch provided by Kevin Conaway. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



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