Which of the following is a common method to prevent Cross-Site Scripting (XSS) attacks?

  • Cross-Site Request Forgery (CSRF)
  • Input validation
  • Output encoding
  • Session hijacking
Output encoding is a common method to prevent Cross-Site Scripting (XSS) attacks. By encoding user-input before displaying it in a web page, potential malicious scripts are neutralized, reducing the risk of XSS vulnerabilities.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *