Skip to content

Commit 896cf81

Browse files
committed
Add comment on importance of Function.getACall()
1 parent 3991b77 commit 896cf81

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

go/ql/src/Security/CWE-079/HtmlTemplateEscapingBypassXss.ql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ class UnescapedType extends Type {
2525

2626
/**
2727
* Holds if the sink is a data value argument of a template execution call.
28+
*
29+
* Note that this is slightly more general than
30+
* `SharedXss::HtmlTemplateSanitizer` because it uses `Function.getACall()`,
31+
* which finds calls through interfaces which the receiver implements. This
32+
* finds more results in practice.
2833
*/
2934
predicate isSinkToTemplateExec(DataFlow::Node sink) {
3035
exists(Method fn, string methodName, DataFlow::CallNode call |

0 commit comments

Comments
 (0)