mirror of
https://github.com/github/codeql.git
synced 2026-04-20 22:44:52 +02:00
JS: Fix a bug in isSafeClientSideUrlProperty
This commit is contained in:
@@ -255,7 +255,7 @@ module TaintTracking {
|
||||
exists(StringSplitCall c |
|
||||
c.getBaseString().getALocalSource() =
|
||||
[DOM::locationRef(), DOM::locationRef().getAPropertyRead("href")] and
|
||||
c.getSeparator() = "?" and
|
||||
c.getSeparator() = ["?", "#"] and
|
||||
read = c.getAPropertyRead("0")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ function t1() {
|
||||
|
||||
sink(href); // $ flow=tainted-url-suffix
|
||||
|
||||
sink(href.split('#')[0]); // $ MISSING: flow=tainted-url-suffix SPURIOUS: flow=taint
|
||||
sink(href.split('#')[0]); // $ MISSING: flow=tainted-url-suffix
|
||||
sink(href.split('#')[1]); // $ flow=taint
|
||||
sink(href.split('#').pop()); // $ flow=taint
|
||||
sink(href.split('#')[2]); // $ flow=taint
|
||||
|
||||
Reference in New Issue
Block a user