Skip to content

Commit

Permalink
XSS fix by mobb-7bd3c974-b1d7-438f-a192-2c6a8aa3472a
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobb autofixer committed Jan 30, 2024
1 parent c9aa7a7 commit 3738e3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xss-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ var username = urlParams.get('username');

var unsafe_div = window.document.getElementById("vulnerable-div");
// here's an XSS:
unsafe_div.innerHTML = "Hello to you " + username;
unsafe_div.textContent = "Hello to you " + username;

0 comments on commit 3738e3c

Please sign in to comment.