← 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?
- A.The header is always empty
- B.The attacker controls the header and can set it to image/jpeg for any file
- C.Browsers encrypt the header
- 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 →