Skip to content

Commit ae805eb

Browse files
committed
don't filter away templated URLs in RemoteServerResponse
1 parent 0edae89 commit ae805eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

javascript/ql/src/semmle/javascript/heuristics/AdditionalSources.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ class RemoteServerResponse extends HeuristicSource, RemoteFlowSource {
4444
// exclude URLs to the current host
4545
r.getUrl().mayHaveStringValue(url) and
4646
protocolPattern = "(?[a-z+]{3,10}:)" and
47-
not url.regexpMatch(protocolPattern + "?//.*")
47+
not url.regexpMatch(protocolPattern + "?//.*") and
48+
not url.prefix(2) = ["{{", "{%"] // look like templating
4849
)
4950
)
5051
}

0 commit comments

Comments
 (0)