File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ function basicExceptions() {
313
313
}
314
314
315
315
function handlebarsSafeString ( ) {
316
- return new Handlebars . SafeString ( location ) ; // NOT OK!
316
+ return new Handlebars . SafeString ( location ) ; // NOT OK!
317
317
}
318
318
319
319
function test2 ( ) {
@@ -355,15 +355,15 @@ function thisNodes() {
355
355
var target = document . location . search
356
356
this . html ( target ) ; // NOT OK. (this is a jQuery object)
357
357
this . innerHTML = target // OK. (this is a jQuery object)
358
-
358
+
359
359
this . each ( function ( i , e ) {
360
360
this . innerHTML = target ; // NOT OK. (this is a DOM-node);
361
361
this . html ( target ) ; // OK. (this is a DOM-node);
362
-
362
+
363
363
e . innerHTML = target ; // NOT OK.
364
364
} ) ;
365
365
}
366
- $ . fn [ pluginName ] = myPlugin ;
366
+ $ . fn [ pluginName ] = myPlugin ;
367
367
368
368
}
369
369
@@ -380,7 +380,7 @@ function test() {
380
380
function test ( ) {
381
381
var target = document . location . search
382
382
383
-
383
+
384
384
$ ( 'myId' ) . html ( target ) ; // NOT OK
385
385
386
386
$ ( 'myId' ) . html ( target . taint ) ; // NOT OK
@@ -401,7 +401,7 @@ function test() {
401
401
if ( random ( ) ) { return ; }
402
402
$ ( 'myId' ) . html ( target . taint6 ) ; // OK
403
403
404
-
404
+
405
405
if ( random ( ) ) { target . taint7 = "safe" ; }
406
406
$ ( 'myId' ) . html ( target . taint7 ) ; // NOT OK
407
407
You can’t perform that action at this time.
0 commit comments