Opened 14 years ago
Closed 14 years ago
#12761 closed defect (bug) (fixed)
Bug in cookie WP HTTP cookie parsing
Reported by: | josephscott | Owned by: | dd32 |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.9.2 |
Component: | HTTP API | Keywords: | has-patch |
Focuses: | Cc: |
Description
There's a small logic bug in the WP HTTP cookie code that will result in a PHP error. The code does an empty check, which is fine, but doesn't take into account the condition where the variable holds a string of spaces. To fix this I've included a small patch to rtrim() the value first, allowing for the empty check to work for this cases.
I ran into this while tracking down an error for some outbound PuSHPress pings on WordPress.com
. It was triggering a PHP fatal error because it resulted in an empty object property trying to be referenced.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
(In [13887]) Whitespace only Cookie pairs are not permitted; Skip them. Props josephscott. Fixes #12761