[wp-trac] [WordPress Trac] #37000: Support for the SameSite cookie attribute

WordPress Trac noreply at wordpress.org
Thu May 3 13:46:11 UTC 2018


#37000: Support for the SameSite cookie attribute
-------------------------+-----------------------------
 Reporter:  johnbillion  |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  5.0
Component:  Security     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  administration
-------------------------+-----------------------------
Changes (by tomdxw):

 * keywords:  needs-patch => has-patch


Comment:

 I’ve written a patch for this. I forked the https://github.com/delight-im
 /PHP-Cookie library suggested by @mwaclawek, and added support for older
 versions of PHP. It’s here: https://github.com/dxw/PHP-Cookie-Legacy

 Only one change was made to src/Cookie.php, and that was to remove the
 namespace: https://github.com/dxw/PHP-Cookie-
 Legacy/commit/a5516d70826a56075eb6d452ae5e2028d61cce7c#diff-
 6c1c5ff819fd1e7697d48e0098012117

 The tests are passing with 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, and 7.2: https
 ://travis-ci.org/dxw/PHP-Cookie-Legacy

 Due to the tests using php-fpm, and php-fpm being introduced in PHP 5.3, I
 wasn’t able to get the tests to work with PHP 5.2 (pull requests welcome).

 I copied src/Cookie.php (without modification) into WordPress, and
 modified four lines in wp-includes/pluggable.php. See attached patch.

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


More information about the wp-trac mailing list