Created
July 7, 2023 13:31
-
-
Save thesp0nge/97167d043cc729a59beb8e0406e0ca15 to your computer and use it in GitHub Desktop.
spot_the_vuln_2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var searchQuery = window.location.hash.substr(1); | |
document.write("Risultati per la ricerca: " + searchQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Modified code to address the vulnerability:
var searchQuery = window.location.hash.substr(1); var sanitizedQuery = encodeURIComponent(searchQuery); document.write("Risultati per la ricerca: " + sanitizedQuery);