未验证 提交 9717da6c 编写于 作者: G gaojun2048 提交者: GitHub

Fix log and config file read (#8884)

上级 adc22346
......@@ -46,6 +46,7 @@ import java.util.concurrent.Executors;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.dolphinscheduler.spi.utils.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -141,10 +142,13 @@ public class LoggerRequestProcessor implements NettyRequestProcessor {
private boolean checkPathSecurity(String path) {
String dsHome = System.getProperty("DOLPHINSCHEDULER_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;
}
} else {
logger.warn("path is null");
}
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册