mirror of
https://github.com/github/codeql.git
synced 2026-01-29 22:32:58 +01:00
Sanitize hostname if there is a slash and a previous component
This commit is contained in:
@@ -55,6 +55,9 @@ private predicate concatenationHasHostnameSanitizingSubstring(StringOps::Concate
|
||||
exists(StringOps::ConcatenationLeaf lf | lf = cat.getALeaf() |
|
||||
lf.getStringValue().regexpMatch(".*([?#]|[^?#:/\\\\][/\\\\]).*|[/\\\\][^/\\\\].*")
|
||||
or
|
||||
lf.getStringValue() = "/" and
|
||||
exists(lf.getPreviousLeaf())
|
||||
or
|
||||
hasHostnameSanitizingSubstring(lf.asNode())
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user