File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/semmle/javascript/security/dataflow
test/query-tests/Security/CWE-601/ClientSideUrlRedirect Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ module ClientSideUrlRedirect {
198
198
HistoryWriteUrlSink ( ) {
199
199
this =
200
200
API:: moduleImport ( "history" )
201
- .getMember ( [ "createBrowserHistory" , "createHashHistory" ] )
201
+ .getMember ( "createBrowserHistory" )
202
202
.getReturn ( )
203
203
.getMember ( [ "push" , "replace" ] )
204
204
.getACall ( )
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ function bar() {
61
61
history . push ( payload ) ; // NOT OK
62
62
}
63
63
function baz ( ) {
64
- const history = require ( 'history' ) . createHashHistory ( ) ;
64
+ const history = require ( 'history' ) . createBrowserHistory ( ) ;
65
65
var payload = history . location . hash . substr ( 1 ) ;
66
66
67
67
history . replace ( payload ) ; // NOT OK
You can’t perform that action at this time.
0 commit comments