Details
-
Bug
-
Resolution: Fixed
-
Medium
-
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:"ExposureTime";s:5:"1/500";s:7:"FNumber";s:5:"35/10";s:15:"ExposureProgram";i:3;s:15:"ISOSpeedRatings";i:100;s:11:"ExifVersion";s:4:"0220";s:16:"DateTimeOriginal";s:19:"2002:09:28 11:01:39";s:17:"DateTimeDigitized";s:19:"2002:09:28 11:01:39";s:23:"ComponentsConfiguration";s:4:""/>
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
Issue Links
- relates to
-
EZP-15547 Exif-related issues
- Closed