Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-13700

eZImageAliasHandler bug when Exif contains ComponentsConfiguration

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 4.1.0rc1
    • 4.0.1
    • None
    • Operating System: Debian Etch
      PHP Version: 5.2.0
      Database and version: mysql 5.0.32
      Browser (and version): All

    Description

      When uploading an image in an object, if the image Exif data contains Components Configuration with value 0x01,0x02,0x03,0x00 / YCbCr (and maybe with other values), the Exif data that is serialized in the function createImageInformationNode of the kernel/classes/datatypes/ezimage/ezimagealiashandler.php file is truncated when converted to XML :
      $serializedNode->setAttribute( 'data', serialize( $infoItem ) );

      The result is that the serialized data inserted in the database is not complete.
      Example:

      <serialized name="exif" data="a:31:{s:12:&quot;ExposureTime&quot;;s:5:&quot;1/500&quot;;s:7:&quot;FNumber&quot;;s:5:&quot;35/10&quot;;s:15:&quot;ExposureProgram&quot;;i:3;s:15:&quot;ISOSpeedRatings&quot;;i:100;s:11:&quot;ExifVersion&quot;;s:4:&quot;0220&quot;;s:16:&quot;DateTimeOriginal&quot;;s:19:&quot;2002:09:28 11:01:39&quot;;s:17:&quot;DateTimeDigitized&quot;;s:19:&quot;2002:09:28 11:01:39&quot;;s:23:&quot;ComponentsConfiguration&quot;;s:4:&quot;"/>
      

      When the data is read, a warning appears :

      unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 286 of 289 bytes in /root_dir/kernel/classes/datatypes/ezimage/ezimagealiashandler.php on line 1035
      
      Steps to reproduce

      Create a new object that contains an image attribute.
      Upload an image with Exif data containing ComponentsConfiguration = Y Cb Cr - (output of the linux program 'exif' )
      Publish the object
      View it with debug output enabled.

      It's also possible to see the truncated data in the data_text column of the ezcontentobject_attribute table (for the good attribute).

      Attachments

        1. issue_13700_trunk.patch
          1 kB
          Cyberwolf
        2. Bandeau.jpg
          47 kB
          pixel166

        Activity

          People

            qwix qwix
            pixel166 pixel166
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: