Skip to content

Commit 20e5eec

Browse files
CWE-80
1 parent c3c1212 commit 20e5eec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CWE-80/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
const main = (html) => {
22
const regex = /<script>.*<\/script>/gi
33

4-
return regex.test(html)
4+
if (regex.test(html)) {
5+
document.body.innerHTML = html
6+
}
57
}

0 commit comments

Comments
 (0)