📞 0339-0387701 (WhatsApp) Contact

« Back to Information & Networking (NCCIA)

How can CSRF be prevented?

A. By disabling HTTPS
B. By using weak passwords
C. By using anti-CSRF tokens and SameSite cookie attributes ✅
D. By using longer URLs

Correct Answer: C. By using anti-CSRF tokens and SameSite cookie attributes

Explanation

An unpredictable token validates that the request came from the site's own form, not a foreign page.