We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f46a34 commit b8ba50aCopy full SHA for b8ba50a
javascript/ql/test/query-tests/Security/CWE-079/XssThroughDom/angular.ts
@@ -0,0 +1,17 @@
1
+import { Component } from "@angular/core";
2
+
3
+@Component({
4
+ template: `
5
+ <input type="text" (input)="setInput1($event)"></input>
6
+ <input type="text" (input)="setInput2($event.target)"></input>
7
+ `
8
+})
9
+export class Foo {
10
+ setInput1(event) {
11
+ document.write(event.target.value); // NOT OK [INCONSISTENCY]
12
+ }
13
14
+ setInput2(target) {
15
+ document.write(target.value); // NOT OK [INCONSISTENCY]
16
17
+}
0 commit comments