Q: The SameSite cookie attribute enables to prevent?
-
A
SQL injection
-
B
Cross-origin information leakage
-
C
Server misconfiguration issues
-
D
XSS
B
Answer:
B
Explanation:
Correct option:
Cross-origin information leakage
Explanation:
The SameSite cookie attribute is designed to prevent cross-origin information leakage by controlling how cookies are sent with cross-site requests. This helps protect against cross-site request forgery (CSRF) attacks by ensuring that cookies are only sent in first-party contexts (i.e., when the user is interacting directly with the site that set the cookie).
It does not directly prevent SQL injection, server misconfiguration issues, or XSS attacks.
Related Topic:
Share Above MCQ