4 ms·
>And how did a PNG file ever pass through the PHP interpreter? It is possible if you do something stupid like blindly including or requiring the "image" file c
by krapp 11y ago
>And how did a PNG file ever pass through the PHP interpreter?
It is possible if you do something stupid like blindly including or requiring the "image" file content, as part of serving the image through a PHP file. Anything run through include() or require() is run through the parser if it contains php tags. I vaguely remember it being an issue with user avatars in one of the more popular PHP forums but I don't remember which.
It's one of those things where even though you can do it that way in PHP, it basically takes a comedy of errors (or just a malicious plugin writer) for it to even occur.
- mschuster91 11y ago> It is possible if you do something stupid like blindly including or requiring the "image" file content, as part of serving the image through a PHP file. This is so stupid, it's actually awesome. fpassthru/readfile are your friends...