Closed Bug 1624668 Opened 5 years ago Closed 5 years ago

In WebExtensions, SameSiteStatus cannot ever be "unspecified"

Categories

(WebExtensions :: Frontend, defect)

75 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1550032

People

(Reporter: z, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0

Steps to reproduce:

In a WebExtension:

chrome.cookies.set({ name: 'foo', value: 'val', sameSite: 'unspecified' })
chrome.cookies.set({ name: 'bar', value: 'val' })
chrome.cookies.getAll()

Actual results:

The first line will throw an Error:

Type error for parameter details (Error processing sameSite: Invalid enumeration value "unspecified") for cookies.set.

The second line will set the cookie, but will set the sameSite prop to no_restriction, not unspecified.

Expected results:

It should behave like Chrome's WebExtension API, which allows a 4th unspecified value to indicate there is no SameSite status for this cookie.

Both of the calls to chrome.cookies.set should set sameSite: 'unspecified'. no_restriction should not be the default value for sameSite, unspecified should be. And unspecified should be a permitted enum value for SameSiteStatus.

For reference:


Please let me know if this bug report is misguided, I just noticed this discrepancy while trying to work with cross-browser WebExtension automation and was not sure if Chrome's or Firefox's approach is correct here.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Frontend
Product: Firefox → WebExtensions
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.