zlacker

[parent] [thread] 0 comments
1. ndsipa+(OP)[view] [source] 2026-01-27 10:56:22
> They read the magic bytes to see it was a jpeg despite being named .png, and read it correctly.

Maybe I'm missing something, but it seems trivial to implement reading the magic bytes. I haven't tested it, but I'd expect most linux image displayers/editors to automatically work with misnamed files as that is almost entirely the purpose of magic bytes.

Personally, I think Microsoft is to blame for everyone relying on file extensions too much as it was a bad idea which led to a lot of security issues.

[go to top]