Browse Source

cheryy-pick [Fix-8913][Worker]fix roll view log null exception #8914 (#8918)

2.0.7-release
Kerwin 3 years ago committed by GitHub
parent
commit
e2b962e775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/log/LoggerRequestProcessor.java

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

@ -142,6 +142,9 @@ public class LoggerRequestProcessor implements NettyRequestProcessor {
private boolean checkPathSecurity(String path) {
String dsHome = System.getProperty("DOLPHINSCHEDULER_HOME");
if (StringUtils.isBlank(dsHome)) {
dsHome = System.getProperty("user.dir");
}
if (!StringUtils.isBlank(path)) {
if (path.startsWith(dsHome) && !path.contains("../") && path.endsWith(".log")) {
return true;

Loading…
Cancel
Save