tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: svn commit: r770809 - /tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
Date Mon, 04 May 2009 10:42:50 GMT
If http://host/contextpath is requested - shouldn't we be redirecting to 
http://host/contextpath/ , not worrying about a null uri?

-Tim


markt@apache.org wrote:
> 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