[wp-trac] [WordPress Trac] #58566: WP_Http::normalize_cookies does not convert cookie names to strings

WordPress Trac noreply at wordpress.org
Wed Jan 3 16:53:47 UTC 2024


#58566: WP_Http::normalize_cookies does not convert cookie names to strings
--------------------------------------+------------------------------
 Reporter:  nosilver4u                |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  HTTP API                  |     Version:  6.2.2
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by darssen):

 > The above should be fixed by adding `(string)` casts to the first
 argument of the `Cookie` constructor in lines 470 & 472 here:
 >
 > https://github.com/WordPress/wordpress-
 develop/blob/ac4f768222ee9583357d44059df6c61940f7b2a5/src/wp-includes
 /class-wp-http.php#L470-L472

 I created a PR with the changes suggested above and added a couple of unit
 tests for it.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58566#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list