You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2016/02/16 17:12:18 UTC

[Bug 59013] New: In 8.0.32, WebappClassLoaderBase.filter throws StringIndexOutOfBoundsException for "org"

https://bz.apache.org/bugzilla/show_bug.cgi?id=59013

            Bug ID: 59013
           Summary: In 8.0.32, WebappClassLoaderBase.filter throws
                    StringIndexOutOfBoundsException for "org"
           Product: Tomcat 8
           Version: 8.0.32
          Hardware: Macintosh
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Manager
          Assignee: dev@tomcat.apache.org
          Reporter: max.tardiveau@ca.com

As of 8.0.32, WebappClassLoaderBase.filter() now looks for "org" in the class
name, but if the class name happens to be just "org", it throws a
StringIndexOutOfBoundsException at line 2780.

This may seem minor (who's got a class called "org"?) but it's not, because
applications that use Rhino will hit this problem very quickly. When loading a
class a.b.c.MyClass, Rhino will try to load each package, i.e. a, then a.b,
then a.b.c, then finally a.b.c.MyClass. So if you try to load a class that's in
a org package, you get the exception.

The fix should be simple: if the class name starts with "org", do *not* assume
that it's longer than 3 characters.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 59013] In 8.0.32, WebappClassLoaderBase.filter throws StringIndexOutOfBoundsException for "org"

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59013

Violeta Georgieva <vi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Violeta Georgieva <vi...@apache.org> ---


*** This bug has been marked as a duplicate of bug 58999 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

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