Open Bug 1550032 Opened 5 years ago Updated 1 year ago

Change cookie API to explicitly support sameSite=none

Categories

(WebExtensions :: General, enhancement, P2)

enhancement

Tracking

(Not tracked)

REOPENED

People

(Reporter: mconca, Unassigned)

References

Details

Attachments

(2 files)

Google intends to update the cookie API to explicitly support the SameSite=None value of the attribute, as well as change the meaning of the default when no SameSite attribute is specified, adding a new 'unspecified' value.

See https://groups.google.com/a/chromium.org/forum/#!topic/chromium-extensions/rwjZcCnlITo

The Firefox WebExtensions API for cookies should be modified to match this change.

Priority: -- → P3

This requires platform support.

Here are relevant resources about the development of SameSite=None

It's not clear whether Mozilla was involved in standardization discussions about this, since the dependency tree of bug 795346 has not recently been modified. SameSite=None is not the only upcoming change, Chromium also appears to be working on SameSite=Extended:

Depends on: 1551798

I think this bug is a dup of 1551798. In bug 1551798 I implemented both SameSite=lax by default and SameSite=None only if secure.
SameSite=Extended should be a separate bug.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

Bug 1551798 does currently not address this bug, because it just changes the default to SAMESITE_NONE, while the extension API should default to NONE or LAX depending on the defaults (if sameSite is not set).

The change must be:

  • If sameSite is set to "unspecified", do whatever the defaults are (lax or none, depending on bug 1551798)
  • If sameSite not set, treat it as "unspecified" (i.e. same behavior as previous line).

Not changed, but the other cases are:

  • If sameSite is set to "none", use SAMESITE_NONE
  • If sameSite is set to "lax", use SAMESITE_LAX
  • If sameSite is set to "strict", use SAMESITE_STRICT

Besides the above change, in order to resolve this bug a unit test must be written for the functionality.
Do you plan to do the above in bug 1551798? If not, then this bug should probably be deduplicated.

Flags: needinfo?(amarchesini)

I didn't realize this was about webExtensions. Reopening the bug.

Status: RESOLVED → REOPENED
Flags: needinfo?(amarchesini)
Resolution: DUPLICATE → ---
Depends on: 1555652

Bug 1551798 adds partial support. There is no "unspecified" keyword, but when sameSite is omitted, the preference-dependent default is chosen.

While looking at the patch, I also noticed that there is an untested issue: Previously, when sameSite was omitted, it defaulted to SameSite=Strict instead of SameSite=None (because absence of sameSite means that sameSite is -1, and -1 is converted to STRICT). This is unintentional, and apparently there is no test coverage, so I'm going to add a unit test when I resolve this bug.

Priority: P3 → P2
Assignee: nobody → anuragakellaak

I'm opening this bug for other contributors since the patches have not had any activity for over 6 months.

Assignee: anuragakellaak → nobody
Severity: normal → S3
Component: Compatibility → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: