Hacker News new | past | comments | ask | show | jobs | submit login

> Despite the [gif] extension, the file was actually a 748-byte Adobe PSD file.

I wish programmers would stop "helpfully parsing" files which are named with an "incorrect" extension. If a random unknown person sends me a file with .gif extension that is actually a PSD file, I most definitely do not want my machine parsing whatever that thing is.




Discourse avatars point to a page with a .png extension regardless of what the actual file is (jpg, gif, or svg). Parsing file headers should not be a dangerous operation and in my opinion is the right thing to do.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: