Bug 56253

Summary: StringIndexOutOfBoundsException in AbstractArchiveResourceSet.list() method
Product: Tomcat 8 Reporter: Larry Isaacs <Larry.Isaacs>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: major    
Priority: P2    
Version: 8.0.x-trunk   
Target Milestone: ----   
Hardware: All   
OS: All   
Attachments: Simple patch to add needed string length check.

Description Larry Isaacs 2014-03-12 23:46:45 UTC
Created attachment 31384 [details]
Simple patch to add needed string length check.

Like in the AbstractArchiveResourceSet.getResource() method, the pathInJar variable can be an empty string in the list() method too.  A length check is needed for list() the same as for getResource().  Marking as major since this is needed for the Eclipse Tomcat "Serve modules without publishing" feature to work with Tomcat 8.

Thanks,
Larry
Comment 1 Mark Thomas 2014-03-13 10:43:45 UTC
Thanks for the report. I added some test cases for this and the other methods that use pathInJar. That found a couple of other issues that I also fixed.

The fix is in 8.0.x for 8.0.4 onwards.