File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
javascript/ql/test/query-tests/Security/CWE-601/ClientSideUrlRedirect Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ function getTaint() {
44 return window . name ;
55}
66
7- shell . openExternal ( getTaint ( ) ) ;
7+ shell . openExternal ( getTaint ( ) ) ; // $ Alert
Original file line number Diff line number Diff line change @@ -2,21 +2,21 @@ window.location = /.*redirect=([^&]*).*/.exec(document.location.href)[1]; // $ A
22
33( function ( ) {
44 var indirect = / .* r e d i r e c t = ( [ ^ & ] * ) .* / ;
5- window . location = indirect . exec ( document . location . href ) [ 1 ] ;
5+ window . location = indirect . exec ( document . location . href ) [ 1 ] ; // $ Alert
66} ) ;
77
88window . 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
1515window . location = new RegExp ( / .* r e d i r e c t = ( [ ^ & ] * ) .* / ) . exec ( document . location . href ) [ 1 ] ; // $ Alert
1616
1717( function ( ) {
1818 var indirect = new RegExp ( / .* r e d i r e c t = ( [ ^ & ] * ) .* / )
19- window . location = indirect . exec ( document . location . href ) [ 1 ] ;
19+ window . location = indirect . exec ( document . location . href ) [ 1 ] ; // $ Alert
2020} ) ;
2121
2222function foo ( win ) {
You can’t perform that action at this time.
0 commit comments