Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-16498

Problem with upload images with huge Exif Data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.3.0
    • Attachments
    • None
    • php 7.4

      We have problem while uploading images from motorola camera devices. There is lot of EXIF data and phpbb says UNABLE_GET_IMAGE_SIZE. We are running php 7.4 and phpbb3.3.0 . Probably problem on GetimageSize

      In case of strip EXIF data from the image, upload working fine. Problematic image attached.

      Our workaround is to bypass following code on phpbb/files/filespec.php{{ }}

      {{$this->image_info = $this->imagesize->getImageSize($this->destination_file, $this->mimetype); }}

      {{if ($this->image_info !== false) }}

      {{{ }}

      {{$this->width = $this->image_info['width']; }}

      {{$this->height = $this->image_info['height']; // Check image type $types = upload::image_types(); if (!isset($types[$this->image_info['type']]) || !in_array($this->extension, $types[$this->image_info['type']])) { if (!isset($types[$this->image_info['type']]))

      { $this->error[] = $this->language->lang('IMAGE_FILETYPE_INVALID', $this->image_info['type'], $this->mimetype); }

      else { $this->error[] = $this->language->lang('IMAGE_FILETYPE_MISMATCH', $types[$this->image_info['type']][0], $this->extension); } } // Make sure the dimensions match a valid image if (empty($this->width) || empty($this->height)) { $this->error[] = $this->language->lang('ATTACHED_IMAGE_NOT_IMAGE'); } } }}

      {{else }}

      {{{ ;; }}

      {{//$this->error[] = $this->language->lang('UNABLE_GET_IMAGE_SIZE'); }}

      {{} }}

      }

       

       

        1. image-2020-05-27-09-53-56-675.png
          6 kB
          3Di [X]
        2. image-2020-05-27-09-58-08-940.png
          7 kB
          3Di [X]
        3. image-2020-05-27-09-59-35-071.png
          1.09 MB
          3Di [X]
        4. IMG_20200524_142044812.jpg
          4.03 MB
          sameleon1 [X]

            Unassigned Unassigned
            sameleon1 sameleon1 [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: