mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
add "slice" as a recognized prefix method in ClientSideUrlRedirectCustomizations.qll
This commit is contained in:
@@ -55,7 +55,7 @@ module ClientSideUrlRedirect {
|
||||
// exclude `location.href.split('?')[0]`, which can never refer to the query string
|
||||
not exists(PropAccess pacc | mce = pacc.getBase() | pacc.getPropertyName() = "0")
|
||||
or
|
||||
(methodName = "substring" or methodName = "substr") and
|
||||
(methodName = "substring" or methodName = "substr" or methodName = "slice") and
|
||||
// exclude `location.href.substring(0, ...)` and similar, which can
|
||||
// never refer to the query string
|
||||
not mce.getArgument(0).(NumberLiteral).getIntValue() = 0
|
||||
|
||||
Reference in New Issue
Block a user