File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
javascript/ql/test/query-tests/Security/CWE-601 Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 11function foo ( ) {
22 var url = document . location . toString ( ) ;
3- window . location = url . substring ( 0 ) . substring ( 1 ) ; // OK [INCONSISTENCY] - but not important
3+ window . location = url . substring ( 0 ) . substring ( 1 ) ; // $ SPURIOUS: Alert - but not important
44 window . location = url . substring ( 0 , 10 ) . substring ( 1 ) ; // $ SPURIOUS: Alert
55 window . location = url . substring ( 0 , url . indexOf ( '/' , 10 ) ) . substring ( 1 ) ; // $ SPURIOUS: Alert
66
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ app.use(async ctx => {
1717 if ( ! url || isCrossDomainRedirect || url . match ( VALID ) ) {
1818 ctx . redirect ( '/' ) ;
1919 } else {
20- ctx . redirect ( url ) ; // possibly OK - flagged anyway
20+ ctx . redirect ( url ) ; // $ Alert - possibly OK but flagged anyway
2121 }
2222
2323 if ( ! url || isCrossDomainRedirect || url . match ( / [ ^ \w / - ] / ) ) {
You can’t perform that action at this time.
0 commit comments