انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهJNR-041-L05

نظرة ثانية على CSRF

  • الدرس 5 من 7
  • Junior
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

decide when CSRF protection is needed.

الموضوعات المخطط لها

  • CSRF: a malicious site makes your browser send a request that carries your cookie.
  • It matters when authentication is by cookie, which the browser adds automatically.
  • A pure bearer-token API, where the token is sent in a header by code, is not affected in the same way.
  • Cookie-based apps keep CSRF protection on (token or SameSite cookies).
  • Do not disable CSRF without being able to say why.
تفاصيل المخطط المبدئي

عرض عملي

a table: cookie session vs bearer token: CSRF needed? yes / no.

اختبر فهمك

Why does a bearer-token API not need CSRF protection?

أظهر الإجابة

Browsers do not attach the token automatically.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.