Closed papereth closed 4 months ago
10 years of commits lead to this kind of cruft Thanks for the heads up
Bet there are more shit like this in vichan code
BTW just in case you haven't noticed it, I have opened a PR with a fix, I've tested this code and noticed nothing wrong so far. https://github.com/vichan-devel/vichan/pull/736
While looking into why some JPEG's orientation wasn't matching its thumbnail, I've noticed that the orientation-correction code in
post.php
does something odd. Specifically here:It's not actually stripping the exif, it's just setting
$file['exif_stripped'] = true;
which actually makes the code skip stripping the exif metadata later. And I'm fairly confident that this command:Doesn't drop the exif, I've tested
gm convert
on test pictures and it was all still there. So I'm of the opinion, and I've actually tested and verified it, that with the following config:A JPEG with Exif orientation metadata could be posted on an imageboard with fully surviving Exif, while one would normally expect that with
$config['strip_exif'] = true;
no Exif data would survive.I don't understand the significance of
If that's set to false, the orientation logic doesn't work at all due to the check at line L1055 weirdly enough.
Other minor issues with this code are:
$upload
and$file['tmp_name'])
as arguments, but these are identical values at this point