drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From parthchandra <...@git.apache.org>
Subject [GitHub] drill pull request #1050: DRILL-5964: Do not allow queries to access paths o...
Date Mon, 27 Nov 2017 20:51:35 GMT
Github user parthchandra commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1050#discussion_r152862636
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
---
    @@ -252,11 +252,15 @@ private static String buildPath(final String[] path, final int folderIndex)
{
         return builder.toString();
       }
     
    -  public static FileSelection create(final DrillFileSystem fs, final String parent, final
String path) throws IOException {
    +  public static FileSelection create(final DrillFileSystem fs, final String parent, final
String path,
    +      final boolean allowAccessOutsideWorkspace) throws IOException {
         Stopwatch timer = Stopwatch.createStarted();
         boolean hasWildcard = path.contains(WILD_CARD);
     
         final Path combined = new Path(parent, removeLeadingSlash(path));
    +    if (!allowAccessOutsideWorkspace) {
    +      checkBackPaths(parent, combined.toString(), path);
    --- End diff --
    
    Done


---

Mime
View raw message