Which of the following is the best way to prevent a DOM-based XSS attack?
A. Set the HttpOnly flag in cookies
B. Ensure that session IDs are not exposed in a URL
C. Ensure that a different nonce is created for each request
D. Validate any input that comes from another Web site
Answer:D
Which of the following is the best way to prevent a DOM-based XSS attack?
A. Set the HttpOnly flag in cookies B. Ensure that session IDs are not exposed in a URL C. Ensure that a different nonce is created for each request D. Validate any input that comes from another Web site