Skip to content

Commit 70c7b70

Browse files
committed
修复 snakeyaml loadJar 漏洞利用封装 bug(thx @Ch1ngg
1 parent ce1be0d commit 70c7b70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jmg-core/src/main/java/jmg/core/util/CtClassUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ public void applyFastjsonGroovyASTTransformation() throws Exception {
6262
// snakeyaml loadJar 的利用需要实现 ScriptEngineFactory 接口
6363
public void applySnakeYamlScriptEngineFactory() throws Exception {
6464
config.setImplementsScriptEngineFactory(true);
65-
JavassistUtil.addAnnotation(ctClass, "javax.script.ScriptEngineFactory");
65+
JavassistUtil.implementInterface(ctClass, "javax.script.ScriptEngineFactory");
6666
}
6767
}

0 commit comments

Comments
 (0)