[wp-trac] Re: [WordPress Trac] #9549: WP should catch serialization errors in options and meta fields

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 28 15:20:30 GMT 2009


#9549: WP should catch serialization errors in options and meta fields
------------------------------------+---------------------------------------
 Reporter:  Denis-de-Bernardy       |        Owner:  anonymous
     Type:  defect (bug)            |       Status:  closed   
 Priority:  normal                  |    Milestone:  2.8      
Component:  General                 |      Version:  2.8      
 Severity:  critical                |   Resolution:  fixed    
 Keywords:  has-patch dev-feedback  |  
------------------------------------+---------------------------------------
Changes (by Denis-de-Bernardy):

  * status:  reopened => closed
  * resolution:  => fixed


Comment:

 Replying to [comment:6 hakre]:
 > Has anybody checked that option values are stored binary-safe in the
 database? If not, we do not need to wonder if unserizalizing errors occur
 here and there. Maybe making the store safe first?

 Well, they definitely aren't stored in a binary safe way. *Maybe* that
 would fix things indeed. But then we'd potentially have multitudes of
 other potential issues, along the lines of no longer being able to
 manipulate meta_key in queries with SQL functions without casting it
 first.

 My personal take on this is that it's a horrible idea to use non-native
 columns to store all of this meta information and that the posts table
 should get additional fields as needed. But then, what do I know. ;-)

 Anyway, re-closing this as fixed, since your other ticket raises the
 is_serialized issue. The fix that was applied in this ticket prevents
 sites from getting fatal errors when an array stored in options or meta
 tables fails to get unserialized. That is a huge improvement in itself.

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


More information about the wp-trac mailing list