[XSS] Interactive testing made a bit easier.

This commit is contained in:
hackademix 2022-01-31 17:15:46 +01:00
parent 49959aa108
commit 0ff5320725
2 changed files with 10 additions and 1 deletions

View File

@ -309,6 +309,16 @@
include("/test/run.js"); include("/test/run.js");
}, },
async testIC(callbackOrUrl) {
await include("xss/InjectionChecker.js");
let IC = await XSS.InjectionChecker;
let ic = new IC();
ic.logEnabled = true;
return (typeof callbackOrUrl === "function")
? await callbackOrUrl(ic)
: ic.checkUrl(callbackOrUrl);
},
async savePolicy() { async savePolicy() {
if (this.policy) { if (this.policy) {
await Storage.set("sync", { await Storage.set("sync", {

View File

@ -51,7 +51,6 @@
"/nscl/common/Permissions.js", "/nscl/common/Permissions.js",
"/nscl/common/Policy.js", "/nscl/common/Policy.js",
"/nscl/common/locale.js", "/nscl/common/locale.js",
"/nscl/common/SyntaxChecker.js",
"/nscl/common/Storage.js", "/nscl/common/Storage.js",
"/nscl/common/include.js", "/nscl/common/include.js",
"/nscl/service/DocStartInjection.js", "/nscl/service/DocStartInjection.js",