[wp-trac] [WordPress Trac] #12761: Bug in cookie WP HTTP cookie parsing
WordPress Trac
wp-trac at lists.automattic.com
Mon Mar 29 18:23:50 UTC 2010
#12761: Bug in cookie WP HTTP cookie parsing
--------------------------+-------------------------------------------------
Reporter: josephscott | Owner: dd32
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: HTTP | Version: 2.9.2
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12761>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list