[wp-trac] [WordPress Trac] #12095: Images insert at full size if metadata contains odd characters

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 20 12:00:00 UTC 2010


#12095: Images insert at full size if metadata contains odd characters
--------------------------+-------------------------------------------------
 Reporter:  whlitwa       |       Owner:               
     Type:  defect (bug)  |      Status:  new          
 Priority:  high          |   Milestone:  3.0          
Component:  Media         |     Version:  2.9.1        
 Severity:  normal        |    Keywords:  needs-testing
--------------------------+-------------------------------------------------

Comment(by miqrogroove):

 We have identified two new problems so far:

 1.  Post meta values are stored as UTF-8 serialized strings.  This means
 they are not binary-safe, and therefore any image headers not stored as
 UTF-8 or ASCII will be broken without conversion.  nacin has added an
 unconditional utf8_encode conversion to any header fields that did not
 previously have it.  This prevents serialization from blowing up at the
 MySQL layer.

 2.  The utf8_encode() function is not appropriate for any image headers
 not stored as ISO-8859-1 or ASCII.  This means all UTF-8 and UCS2 image
 headers are broken by WordPress.  The current obstacle in fixing this is
 that we do not have any UTF-8 or UCS2 encoded sample images with which we
 could test a patch for this ticket.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12095#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list