Skip to content

Commit 5419143

Browse files
committed
remove createHashHistory from the history sink
1 parent d30f53a commit 5419143

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

javascript/ql/src/semmle/javascript/security/dataflow/ClientSideUrlRedirectCustomizations.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ module ClientSideUrlRedirect {
198198
HistoryWriteUrlSink() {
199199
this =
200200
API::moduleImport("history")
201-
.getMember(["createBrowserHistory", "createHashHistory"])
201+
.getMember("createBrowserHistory")
202202
.getReturn()
203203
.getMember(["push", "replace"])
204204
.getACall()

javascript/ql/test/query-tests/Security/CWE-601/ClientSideUrlRedirect/tst13.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function bar() {
6161
history.push(payload); // NOT OK
6262
}
6363
function baz() {
64-
const history = require('history').createHashHistory();
64+
const history = require('history').createBrowserHistory();
6565
var payload = history.location.hash.substr(1);
6666

6767
history.replace(payload); // NOT OK

0 commit comments

Comments
 (0)