drill-dev mailing list archives

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

    https://github.com/apache/drill/pull/1050#discussion_r153337275
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceConfig.java
---
    @@ -30,18 +30,25 @@
     public class WorkspaceConfig {
     
       /** Default workspace is a root directory which supports read, but not write. */
    -  public static final WorkspaceConfig DEFAULT = new WorkspaceConfig("/", false, null);
    +  public static final WorkspaceConfig DEFAULT = new WorkspaceConfig("/", false, null,
false);
     
       private final String location;
       private final boolean writable;
       private final String defaultInputFormat;
    -
    +  private final Boolean allowAccessOutsideWorkspace; // allow access outside the workspace
by default. This
    +                                                     // field is a Boolean (not boolean)
so that we can
    +                                                     // assign a default value if it
is not defined in a
    +                                                     // storage plugin config
       public WorkspaceConfig(@JsonProperty("location") String location,
                              @JsonProperty("writable") boolean writable,
    -                         @JsonProperty("defaultInputFormat") String defaultInputFormat)
{
    +                         @JsonProperty("defaultInputFormat") String defaultInputFormat,
    +                         @JsonProperty("allowAccessOutsideWorkspace") Boolean allowAccessOutsideWorkspace
    +      ) {
         this.location = location;
         this.writable = writable;
         this.defaultInputFormat = defaultInputFormat;
    +    //this.allowAccessOutsideWorkspace = allowAccessOutsideWorkspace != null ? allowAccessOutsideWorkspace
: false ;
    +    this.allowAccessOutsideWorkspace = true;
    --- End diff --
    
    It seems we should not always set true...


---

Mime
View raw message