Merge pull request #5391 from erik-krogh/additionalXss

Approved by asgerf
This commit is contained in:
CodeQL CI
2021-03-15 04:50:54 -07:00
committed by GitHub
3 changed files with 32 additions and 1 deletions

View File

@@ -44,7 +44,8 @@ class RemoteServerResponse extends HeuristicSource, RemoteFlowSource {
// exclude URLs to the current host
r.getUrl().mayHaveStringValue(url) and
protocolPattern = "(?[a-z+]{3,10}:)" and
not url.regexpMatch(protocolPattern + "?//.*")
not url.regexpMatch(protocolPattern + "?//.*") and
not url.prefix(2) = ["{{", "{%"] // look like templating
)
)
}