Assuming file type by name rather than by contents opens a whole 'nother can of worms.
Content injection vulnerability is bad, and that's the core of what sniffing does. Failing randomly like in this case is mild in comparison.
Like I get that sometimes you have to do what you have to do, but sniffing should be a last resort.
Tbf magic bytes are also not that helpful here
Content injection vulnerability is bad, and that's the core of what sniffing does. Failing randomly like in this case is mild in comparison.
Like I get that sometimes you have to do what you have to do, but sniffing should be a last resort.