• Tutorials
  • Courses
  • Tracks

You must prevent malware hidden in image files. Which server-side check gives the best practical protection

Last Updated :
Discuss
Comments

You must prevent malware hidden in image files. Which server-side check gives the best practical protection

Only check file extension.

Validate MIME type from client-supplied headers.

Rely on antivirus scanning only.

Inspect file “magic bytes” / file signature and re-encode images server-side.

Share your thoughts in the comments