Opened 18 years ago
Closed 18 years ago
#6210 closed defect (bug) (fixed)
Impossible to add widgets on some platforms
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.5 | Priority: | normal |
| Severity: | blocker | Version: | 2.5 |
| Component: | General | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
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).
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
(In [7281]) Avoid integer overflow with widget IDs. Props mdawaffe. fixes #6210