tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r770809 - /tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
Date Fri, 01 May 2009 20:12:10 GMT
Author: markt
Date: Fri May  1 20:12:09 2009
New Revision: 770809

URL: http://svn.apache.org/viewvc?rev=770809&view=rev
Log:
Fix 47080: NPE in RealmBase.findSecurityConstraints when uri is null 
https://issues.apache.org/bugzilla/show_bug.cgi?id=47080

Modified:
    tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=770809&r1=770808&r2=770809&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Fri May  1 20:12:09 2009
@@ -471,6 +471,11 @@
 
         // Check each defined security constraint
         String uri = request.getRequestPathMB().toString();
+        // Bug47080 - in rare cases this may be null
+        // Mapper treats as '/' do the same to prevent NPE
+        if (uri == null) {
+            uri = "/";
+        }
         
         String method = request.getMethod();
         int i;



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


Mime
View raw message