You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/03/16 02:13:13 UTC

[GitHub] [dolphinscheduler] gaojun2048 commented on a change in pull request #8883: blank path should not be read

gaojun2048 commented on a change in pull request #8883:
URL: https://github.com/apache/dolphinscheduler/pull/8883#discussion_r827566224



##########
File path: dolphinscheduler-log-server/src/main/java/org/apache/dolphinscheduler/server/log/LoggerRequestProcessor.java
##########
@@ -146,10 +147,13 @@ public void process(Channel channel, Command command) {
      */
     private boolean checkPathSecurity(String path) {
         String dsHome = System.getProperty("DOLPHINSCHEDULER_WORKER_HOME");
-        if (path.startsWith(dsHome) && !path.contains("../") && path.endsWith(".log")) {
-            return true;
+        if (!StringUtils.isBlank(path)) {
+            if (path.startsWith(dsHome) && !path.contains("../") && path.endsWith(".log")) {
+                return true;
+            }

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org