Fix bad models, add tests for those

This commit is contained in:
Tony Torralba
2022-09-09 10:08:52 +02:00
parent 6413de6c20
commit d748fb5648
3 changed files with 7 additions and 3 deletions

View File

@@ -86,6 +86,10 @@ public class VelocitySSTI {
StringWriter w = new StringWriter();
VelocityEngine engine = null;
engine.mergeTemplate("testtemplate.vm", "UTF-8", context, w); // $hasTemplateInjection
AbstractContext ctx = null;
ctx.put("key", code);
engine.evaluate(ctx, null, null, null); // $hasTemplateInjection
engine.evaluate(null, null, null, code); // $hasTemplateInjection
}
@GetMapping(value = "bad6")