fixed #5154,avoid spring RCE

This commit is contained in:
jianghang.loujh
2024-06-06 15:29:17 +08:00
parent d66a15fe35
commit 7bb619cf12
7 changed files with 17 additions and 3 deletions

View File

@@ -30,6 +30,9 @@ public class TableMetaTSDBBuilder {
if (applicationContext == null) {
synchronized (contexts) {
if (applicationContext == null) {
if (!StringUtils.startsWithIgnoreCase("classpath:", springXml)) {
springXml = "classpath:" + springXml;
}
applicationContext = new ClassPathXmlApplicationContext(springXml);
contexts.put(destination, applicationContext);
}