1 Reply Latest reply on Oct 14, 2006 3:33 PM by starksm64

    Path tokenization and VFSUtils.addManifestLocations

    starksm64

      Although it makes some sense to disallow a relative path containing ".." from a VirtualFile.findChild, its too restricitve for the VFSUtils.addManifestLocations

      java.lang.IllegalArgumentException: Reverse paths are not allowed (containing a . or ..), use getParent(): ../cp-mf.jar
       at org.jboss.virtual.plugins.vfs.helpers.PathTokenizer.getTokens(PathTokenizer.java:67)
       at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:230)
       at org.jboss.virtual.plugins.context.file.FileHandler.findChild(FileHandler.java:166)
       at org.jboss.virtual.VirtualFile.findChild(VirtualFile.java:374)
       at org.jboss.virtual.VFSUtils.addManifestLocations(VFSUtils.java:130)
      


      Its too common for Class-Path entries to refer to arbitrary relative locations using either "." or ".." in the path. VFSUtils.addManifestLocations is going to have to do more work to canonicalization the path.