🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Secure File Uploads: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. Why is checking only the Content-Type header of an upload not safe?
  2. Q2. What is a web shell?
  3. Q3. What does this print? (code)
  4. Q4. What are magic bytes?
  5. Q5. What does this print? (code)
  6. Q6. Why should an uploaded file be saved under a new random name?
  7. Q7. Why store uploads outside the web root?
  8. Q8. Why is accepting SVG images from users risky?
  9. Q9. What does the header Content-Disposition: attachment do?
  10. Q10. Why is an extension allowlist better than blocking .php?