🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Secure File Uploads: all 10 questions

Quiz: Secure File Uploads · Question 1 of 10

Why is checking only the Content-Type header of an upload not safe?

Why is checking only the Content-Type header of an upload not safe?

  1. A.The header is always empty
  2. B.The attacker controls the header and can set it to image/jpeg for any file
  3. C.Browsers encrypt the header
  4. D.Servers cannot read headers
Answer & explanation

Correct answer: The attacker controls the header and can set it to image/jpeg for any file

The header is a claim made by the client, not proof of the content.

Can you get the rest right without peeking?

Take the timed Quiz: Secure File Uploads quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →