mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
JS: Add Angular test case in XssThroughDom
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { Component } from "@angular/core";
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
<input type="text" (input)="setInput1($event)"></input>
|
||||
<input type="text" (input)="setInput2($event.target)"></input>
|
||||
`
|
||||
})
|
||||
export class Foo {
|
||||
setInput1(event) {
|
||||
document.write(event.target.value); // NOT OK [INCONSISTENCY]
|
||||
}
|
||||
|
||||
setInput2(target) {
|
||||
document.write(target.value); // NOT OK [INCONSISTENCY]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user