JS: Add Angular test case in XssThroughDom

This commit is contained in:
Asger F
2025-01-09 13:10:04 +01:00
parent 6f46a34873
commit b8ba50a9ac

View File

@@ -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]
}
}