Skip to content

Commit 2d08a6e

Browse files
committed
JS: Accept some alerts
1 parent cd99d6a commit 2d08a6e

File tree

2 files changed

+4
-4
lines changed
  • javascript/ql/test/query-tests/Security/CWE-601/ClientSideUrlRedirect

2 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ function getTaint() {
44
return window.name;
55
}
66

7-
shell.openExternal(getTaint());
7+
shell.openExternal(getTaint()); // $ Alert

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ window.location = /.*redirect=([^&]*).*/.exec(document.location.href)[1]; // $ A
22

33
(function(){
44
var indirect = /.*redirect=([^&]*).*/;
5-
window.location = indirect.exec(document.location.href)[1];
5+
window.location = indirect.exec(document.location.href)[1]; // $ Alert
66
});
77

88
window.location = new RegExp('.*redirect=([^&]*).*').exec(document.location.href)[1]; // $ Alert
99

1010
(function(){
1111
var indirect = new RegExp('.*redirect=([^&]*).*')
12-
window.location = indirect.exec(document.location.href)[1];
12+
window.location = indirect.exec(document.location.href)[1]; // $ Alert
1313
});
1414

1515
window.location = new RegExp(/.*redirect=([^&]*).*/).exec(document.location.href)[1]; // $ Alert
1616

1717
(function(){
1818
var indirect = new RegExp(/.*redirect=([^&]*).*/)
19-
window.location = indirect.exec(document.location.href)[1];
19+
window.location = indirect.exec(document.location.href)[1]; // $ Alert
2020
});
2121

2222
function foo(win) {

0 commit comments

Comments
 (0)