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

Problem with upload images with huge Exif Data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3.0
    • Fix Version/s: None
    • Component/s: Attachments
    • Labels:
      None
    • Environment:
      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

          Activity

            People

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

              Dates

              Created:
              Updated: