Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-15103

JPEG dimensions undetectable when JFIF header is missing

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.2.1-RC1
    • Posting
    • PHP 7.1, Windows 7x64

    Description

      In https://www.phpbb.com/community/viewtopic.php?f=556&t=2407186 I found out the user trying to upload a JPEG with a missing JFIF header. 3.2.0 uses /vendor/marc1706/fast-image-size/lib/Type/TypeJpeg.php, which analyzes the JPEG segments and only gets dimensions from the JFIF header. When nothing is found, there is no fallback to trying PHP's getimagesize(), which would still provide correct dimensions for such a picture.

      I'm flagging this as major bug since this is a downstep, given that many people use Adobe Photoshop and this software in recent versions outputs such non standard compliant files. The files however have EXIF data, and the "fast-image-size" code should be smart enough to look out for dimension info there as well. Not to speak of being able to use getimagesize() as a last resort.

      Attachments

        1. P90505-140230.jpg
          1.88 MB
          Vitaly Filatenko [X]

        Activity

          People

            Marc Marc
            AmigoJack AmigoJack
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: