Skip to content

Commit c81d85f

Browse files
author
Porcupiney Hairs
committed
Include suggestions from review
1 parent e536628 commit c81d85f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

java/ql/src/experimental/Security/CWE/CWE-094/TemplateInjection.qhelp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
<code>code</code>
1717
is used as a Velocity template string. This can lead to remote code execution.
1818
</p>
19-
<sample src="SSTIBad.py" />
19+
<sample src="SSTIBad.java" />
2020

2121
<p>
2222
In the next example the problem is avoided by using a fixed template string
2323
<code>s</code>
2424
. Since, the template is not attacker controlled in this case, we prevent untrusted code execution.
2525
</p>
26-
<sample src="SSTIGood.py" />
26+
<sample src="SSTIGood.java" />
2727
</example>
2828
<references>
2929
<li>Portswigger : [Server Side Template Injection](https://portswigger.net/web-security/server-side-template-injection)</li>

java/ql/test/experimental/query-tests/security/CWE-094/JinJavaSSTI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void bad1(HttpServletRequest request) {
2121
String template = request.getParameter("template");
2222
Jinjava jinjava = new Jinjava();
2323
Map<String, Object> context = new HashMap<>();
24-
// String render(String template, Map<String,​?> bindings)
24+
// String render(String template, Map<String,​?> bindings)
2525
String renderedTemplate = jinjava.render(template, context);
2626
}
2727

0 commit comments

Comments
 (0)