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

      {{} }}

      }

       

       

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

              Created:
              Updated: