refactor the js/xss query to use three flowlabels and one configuration

This commit is contained in:
Erik Krogh Kristensen
2022-03-01 16:29:35 +01:00
parent 87842bb8b7
commit f083e87fa1
7 changed files with 1359 additions and 106 deletions

View File

@@ -476,12 +476,12 @@ function urlStuff() {
$("<img>", {src: url}).appendTo("body"); // NOT OK
$("<a>", {href: win.location.href}).appendTo("body"); // OK
$("<img>", {src: "http://google.com/" + url}).appendTo("body"); // OK - but flagged [INCONSISTENCY]
$("<img>", {src: "http://google.com/" + url}).appendTo("body"); // OK
$("<img>", {src: ["http://google.com", url].join("/")}).appendTo("body"); // OK - but flagged [INCONSISTENCY]
$("<img>", {src: ["http://google.com", url].join("/")}).appendTo("body"); // OK
if (url.startsWith("https://")) {
$("<img>", {src: url}).appendTo("body"); // OK - but flagged [INCONSISTENCY]
$("<img>", {src: url}).appendTo("body"); // OK
} else {
$("<img>", {src: url}).appendTo("body"); // NOT OK
}