How does a CSP help in mitigating cross-site scripting (XSS) attacks?
- By controlling user access permissions
- By encrypting all data in transit
- By monitoring server logs
- By specifying which domains can load resources
A Content Security Policy (CSP) helps mitigate XSS attacks by specifying which domains can load resources on a web page. It provides a whitelist of approved sources for content, helping to prevent malicious scripts from executing from unauthorized sources, thereby enhancing security.
Loading...
Related Quiz
- Sarah, a web security analyst, receives a report that a certain page on the company's website is vulnerable to an XSS attack. She decides to implement a CSP. Which of the following directives should she prioritize to mitigate this specific threat?
- In a VPN, what is the role of a "tunneling protocol"?
- In the context of data protection, what is the primary purpose of data encryption?
- Which of the following is NOT a recommended practice to prevent SQL injection?
- _______ is a type of malware that encrypts user data and demands a ransom for the decryption key.