[wp-trac] [WordPress Trac] #6210: Impossible to add widgets on some platforms

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 14 00:50:21 GMT 2008


#6210: Impossible to add widgets on some platforms
----------------------+-----------------------------------------------------
 Reporter:  mdawaffe  |       Owner:  anonymous       
     Type:  defect    |      Status:  new             
 Priority:  normal    |   Milestone:  2.5             
Component:  General   |     Version:  2.5             
 Severity:  blocker   |    Keywords:  has-patch commit
----------------------+-----------------------------------------------------
 The new multiwidgets use {{{{time() . incrementor}}}} as their widget ids
 in order to avoid collisions.

 Those ids are over {{{2^33}}} which, on some platforms, causes
 {{{array_map()}}} inside {{{add_magic_quotes( $_POST )}}} or
 {{{stripslashes_deep( $_POST )}}} to mis-map those large array keys.

 The end result is a mismatch between array keys and array values when
 trying to add widgets.  The addition fails.

 Attached changes the widget ids to be {{{{( time() - 1199145600 ) .
 incrementor}}}} (1199145600 is January 1st, 2008).  This gives us about 27
 years of breathing room before we run into the bug again (at least on the
 {{{2^33}}}-limited box I was testing with).

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6210>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list