File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
lib/semmle/javascript/dataflow
test/library-tests/TaintedUrlSuffix Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ module TaintTracking {
255255 exists ( StringSplitCall c |
256256 c .getBaseString ( ) .getALocalSource ( ) =
257257 [ DOM:: locationRef ( ) , DOM:: locationRef ( ) .getAPropertyRead ( "href" ) ] and
258- c .getSeparator ( ) = "?" and
258+ c .getSeparator ( ) = [ "?" , "#" ] and
259259 read = c .getAPropertyRead ( "0" )
260260 )
261261 }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ function t1() {
55
66 sink ( href ) ; // $ flow=tainted-url-suffix
77
8- sink ( href . split ( '#' ) [ 0 ] ) ; // $ MISSING: flow=tainted-url-suffix SPURIOUS: flow=taint
8+ sink ( href . split ( '#' ) [ 0 ] ) ; // $ MISSING: flow=tainted-url-suffix
99 sink ( href . split ( '#' ) [ 1 ] ) ; // $ flow=taint
1010 sink ( href . split ( '#' ) . pop ( ) ) ; // $ flow=taint
1111 sink ( href . split ( '#' ) [ 2 ] ) ; // $ flow=taint
You can’t perform that action at this time.
0 commit comments