Skip to content

Commit 291134b

Browse files
committed
add failing test
1 parent 8e9e3c8 commit 291134b

File tree

1 file changed

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

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// OK
2+
function foo() {
3+
var urlParts = document.location.href.split('?');
4+
var loc = urlParts[0] + "?" + boxes.value;
5+
window.location = loc
6+
}

0 commit comments

Comments
 (0)