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

Problem with upload images with huge Exif Data

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 3.3.0
    • None
    • Attachments
    • None
    • php 7.4

    Description

      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'); }}

      {{} }}

      }

       

       

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            sameleon1 sameleon1
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: