XSS من منظور الواجهة الخلفية
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
know what the backend does about cross-site scripting.
الموضوعات المخطط لها
- XSS: an attacker's script runs in another user's browser.
- Stored XSS: the payload is saved (for example in a product review) and shown to others. Reflected XSS: it is echoed back from the request, such as in a link.
- A JSON API is mostly safe if it returns the right
Content-Type: application/jsonand never HTML built from input. - If you produce HTML or emails, encode output for its context.
- Add headers such as
X-Content-Type-Options: nosniffand a Content-Security-Policy (more in JNR-042).
تفاصيل المخطط المبدئي
عرض عملي
review text <script>alert(1)</script> stored as text and shown encoded as <script>....
اختبر فهمك
Which is saved and shown to many users: stored or reflected XSS?
أظهر الإجابة
Stored.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.