Uh oh!
There was an error while loading. Please reload this page.
[RFC] partitioned option for setcookie/setrawcookie and sessions - #12652
[RFC] partitioned option for setcookie/setrawcookie and sessions#12652ndossche wants to merge 2 commits into
Conversation
iluuu1994
commented
Dec 21, 2023
Partitioned cookies are marked as experimental by Mozilla (https://developer.mozilla.org/en-US/docs/Web/Privacy/Partitioned_cookies). Theoretically this means they are subject to change. It seems they're mostly pushed by Google. I'm also unsure about the premise of the original issue:
I haven't tested this, but I think what this means is that Maybe this warrants a short e-mail to the ML? I'm not a specialist in regards to cookies. Maybe other people have something to add. |
DustinAPI
commented
Jan 5, 2024
@nielsdos I am attempting to implement CHIPS for my app with an ugly workaround manually setting the cookie header so this PR would be very helpful but I think it should also include changes to the session cookie to truly allow developers to fix the problem. session_set_cookie_params(['partitioned' => true]) My use case is the most basic wherin my app (tool) is displayed in an iframe within a learning management system (LMS) and requires a session cookie for further interaction after the inital LTI launch. |
morsssss
commented
Jan 5, 2024
AFAIK, Mozilla and Safari have experimented with similar ideas, but right now only Chrome supports the
That's it indeed! Chrome just started an experiment, now active for 1% of users, in which it will block third-party cookies that lack the If this experiment results in a launch down the road, I think plenty of developers will want to use |
ndossche
commented
Jan 6, 2024
Yeah, I fear that the scope of this must be increased, and ini settings are probably necessary too. |
bukka
commented
Jan 12, 2024
I think we should probably have RFC for this as the agreement is not clear (Derick raised some concerns on internals) so I don't think we can just merge this. |
e609e44 to
744fd4cComparexepozz
commented
Jul 15, 2025
LGTM |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
It already looks misaligned, so let's have the space after comma:
| STD_PHP_INI_BOOLEAN("session.cookie_partitioned","0",PHP_INI_ALL, OnUpdateSessionBool, cookie_partitioned, php_ps_globals, ps_globals) | |
| STD_PHP_INI_BOOLEAN("session.cookie_partitioned","0", PHP_INI_ALL, OnUpdateSessionBool, cookie_partitioned, php_ps_globals, ps_globals) |
There was a problem hiding this comment.
I'll just add a commit to reformat this table. But a separate commit for history reasons...
There was a problem hiding this comment.
Using false/true here is inconsistent with the rest and also with the reassignment in line 1809. This should be unified one way or another.
Independent of this, this should probably be fixed once and for all with a tree-wide Coccinelle run. Something like:
@@
bool b;
@@
- b = 1
+ b = true
@@
bool b;
@@
- b = 0
+ b = false
There was a problem hiding this comment.
I'll fix this for ext/session post-merge as a follow up
There was a problem hiding this comment.
I'll fix this for ext/session post-merge as a follow up
Would do this tree-wide (possibly with per-extension commits) to not fix this piecemeal. See also: #19418 (comment)
A good opportunity might be right when branching PHP 8.5.
TimWolla
commented
Aug 12, 2025
Vote seems exceedingly likely to pass and the implementation is good except for minor nits, thus already requesting RM review as per https://externals.io/message/128453. |
ndossche
commented
Aug 12, 2025
Vote was accepted |
TimWolla
left a comment
There was a problem hiding this comment.
Previous remarks are just nits without an effect on functionality, so this should've been an approval.
832ea24 to
9d42a82Compare…n PHP 8.5 (xabbuh) This PR was merged into the 6.4 branch. Discussion ---------- [HttpFoundation] fix session cookie options assertions on PHP 8.5 | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT see php/php-src#12652 Commits ------- 3c7a8ac fix session cookie options assertions on PHP 8.5
RFC: https://wiki.php.net/rfc/chips