diff --git a/tests/java/lang/code_injection/testdata/main.java b/tests/java/lang/code_injection/testdata/main.java index 41d70ffc8..d118deef3 100644 --- a/tests/java/lang/code_injection/testdata/main.java +++ b/tests/java/lang/code_injection/testdata/main.java @@ -3,14 +3,14 @@ public class Foo { - public void bad(String script, HttpServletResponse response) throws Exception { + public void bad(String script, HttpServletRequest req, HttpServletResponse res) { ScriptEngineManager factory = new ScriptEngineManager(); ScriptEngine engine = factory.getEngineByName("javascript"); engine.eval(script); Invocable invocable = (Invocable) engine; - var foo = request.getParameter("foo"); + var foo = req.getParameter("foo"); // bearer:expected java_lang_code_injection String badFunc = (String) invocable.invokeFunction("myFunc", foo);