We have implemented the CHIPS(Cookies Having Independent Partitioned State) solution on our website by adding the partition attribute. It works fine when a user logs in for the first time. However, if a user is already logged in and we attempt to modify the existing cookie by adding the partition attribute or if we try to log in another user without logging out the current user, the cookie is supposed to be overridden. Instead, we observe two cookies with the same name and value, one with the partition key and one without. This seems to be an issue with the beta version, or is it the expected behavior? For other attributes, the cookie is correctly overridden, but with the partition attribute, this unusual case occurs.
Steps to Reproduce:
Add the partitioned attribute while setting cookie.
First set cookie without partitioned attribute from server to client.
Set-Cookie: __Host-name=value; Secure; Path=/; SameSite=None;
Then try to add partitioned attribute in set-cookie response.
Set-Cookie: __Host-name=value; Secure; Path=/; SameSite=None; Partitioned;
You will see two cookie getting set in chrome browser with same name(one with partitioned attribute and one without partitioned attribute)
Environment:
Chrome Version: 122.0.6261.111 (Official Build) (64-bit)
Operating System: Ubuntu 22.04.4 LTS
Actual Behavior:
Two cookies are created with the same name and value:
One cookie with the partition attribute.
One cookie without the partition attribute.
Expected Behavior:
The existing cookie should be overridden with the new one having the partition attribute.