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

Input Validation ensures data meets expected criteria before processing, while Output Encoding converts special characters to safe representations, preventing malicious scripts from executing. These two practices directly combat XSS by controlling what enters the system and how it's rendered. Authentication/Authorization and Cryptography address access control and data protection, not script injection prevention.