src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystemProvider.java
changeset 55107 931a4d5367a6
parent 55070 d850d0f41c72
equal deleted inserted replaced
55106:ebc4e5a625e2 55107:931a4d5367a6
   188         }
   188         }
   189         if (uri.getFragment() != null) {
   189         if (uri.getFragment() != null) {
   190             throw new IllegalArgumentException("Fragment component present");
   190             throw new IllegalArgumentException("Fragment component present");
   191         }
   191         }
   192         String path = uri.getPath();
   192         String path = uri.getPath();
   193         if (path == null || path.charAt(0) != '/') {
   193         if (path == null || path.charAt(0) != '/' || path.contains("..")) {
   194             throw new IllegalArgumentException("Invalid path component");
   194             throw new IllegalArgumentException("Invalid path component");
   195         }
   195         }
   196         return getTheFileSystem().getPath(path);
   196 
       
   197         return getTheFileSystem().getPath("/modules" + path);
   197     }
   198     }
   198 
   199 
   199     private FileSystem getTheFileSystem() {
   200     private FileSystem getTheFileSystem() {
   200         checkPermission();
   201         checkPermission();
   201         FileSystem fs = this.theFileSystem;
   202         FileSystem fs = this.theFileSystem;