Browse Source

blank path should not be read (#8883)

3.0.0/version-upgrade
gaojun2048 3 years ago committed by GitHub
parent
commit
b1f7f788fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      dolphinscheduler-log-server/src/main/java/org/apache/dolphinscheduler/server/log/LoggerRequestProcessor.java

9
dolphinscheduler-log-server/src/main/java/org/apache/dolphinscheduler/server/log/LoggerRequestProcessor.java

@ -151,11 +151,12 @@ public class LoggerRequestProcessor implements NettyRequestProcessor {
if (StringUtils.isBlank(dsHome)) { if (StringUtils.isBlank(dsHome)) {
dsHome = System.getProperty("user.dir"); dsHome = System.getProperty("user.dir");
} }
if (path.startsWith(dsHome) && !path.contains("../") && path.endsWith(".log")) { if (StringUtils.isBlank(path)) {
return true; logger.warn("path is null");
return false;
} else {
return path.startsWith(dsHome) && !path.contains("../") && path.endsWith(".log");
} }
return false;
} }
public ExecutorService getExecutor() { public ExecutorService getExecutor() {

Loading…
Cancel
Save