Is this JS script vulnerable to XSS?
Okay so i have a JS function that take my server response that would be multiple html Elements. I add all of those elements with innerHTML and i know it can cause XSS attack but i struggle to understand how XSS work but i have a vague idea on how it work. I was just wondering if in this configuration it could cause XSS? Also on the server side everything is sanitized to prevent any html user input. JS Code : function searchCharacter(search_param){ let main_screen = document.getElementById("main_screen"); while(main_screen.firstChild){ main_screen.removeChild(main_screen.firstChild); } var xhtt
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.