Multiple choice technology security

Which set of security API methods could be used as the best defense against Cross Site Scripting?

  1. Input Validation and OutPut Encoding

  2. Authentication and Authorization

  3. Data Protection and Cryptography

  4. HTTP and Communication Security

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Cross-Site Scripting (XSS) occurs when untrusted input is executed in the browser. Input validation restricts malicious data from entering the application, and output encoding prevents the browser from interpreting user input as executable code, forming the best defense.