未验证 提交 5197004d 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Fix CVE in the endpoint grouping, when activating the dynamic configuration feature. (#5801)

上级 901e8d84
......@@ -31,6 +31,7 @@ Release Notes.
* Fix storage-jdbc isExists not set dbname.
* Fix `searchService` bug in the InfluxDB storage implementation.
* Fix CVE in the alarm module, when activating the dynamic configuration feature.
* Fix CVE in the endpoint grouping, when activating the dynamic configuration feature.
* Make the codes and doc consistent in sharding server and core server.
#### UI
......
......@@ -25,6 +25,7 @@ import java.util.Map;
import java.util.Objects;
import org.apache.skywalking.apm.util.StringUtil;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;
/**
* Read the input stream including the default endpoint grouping rules. And trans
......@@ -33,13 +34,13 @@ public class EndpointGroupingRuleReader {
private Map yamlData;
public EndpointGroupingRuleReader(InputStream inputStream) {
Yaml yaml = new Yaml();
yamlData = yaml.loadAs(inputStream, Map.class);
Yaml yaml = new Yaml(new SafeConstructor());
yamlData = (Map) yaml.load(inputStream);
}
public EndpointGroupingRuleReader(Reader io) {
Yaml yaml = new Yaml();
yamlData = yaml.loadAs(io, Map.class);
Yaml yaml = new Yaml(new SafeConstructor());
yamlData = (Map) yaml.load(io);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册