Closed Bug 1641022 Opened 4 years ago Closed 2 years ago

browser.cookies.remove fails to remove cookie with ? in path.

Categories

(WebExtensions :: General, defect, P3)

76 Branch
defect

Tracking

(firefox79 affected, firefox80 affected, firefox81 affected)

RESOLVED DUPLICATE of bug 1440263
Tracking Status
firefox79 --- affected
firefox80 --- affected
firefox81 --- affected

People

(Reporter: kennethtran93, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

Cookies with Path having question marks aren't removed properly via WebExtensions browser.cookies.remove().

The original cookie was set from portal.bizagi.com after logging in (an account could be created using disposable email if that helps).

cookie in question that was retrieved through browser.cookies.getAll() and wasn't cleared via browser.cookies.remove:
{
"name": "wordpress_logged_in_1f139463967a86d7839c7ded0baee623",
"value": "l6dr1w%2Bz5ehtxq7r894%40sharklasers.com%7C1590685895%7C6ef585962a7587495735bd4e910962ad",
"domain": "portal.bizagi.com",
"hostOnly": true,
"path": "/en/component/wordpress/?Itemid=1022/",
"secure": false,
"httpOnly": true,
"sameSite": "no_restriction",
"session": true,
"firstPartyDomain": "",
"storeId": "firefox-default"
}

The attached minimal testcase extension attached creates a cookie on the domain 'example.com' so that the cookie can also be seen through (and remove from) the Storage tab of DevTools. A PNG image is also attached showing the result of the testcase extension.

Actual results:

When the url created from domain and path combined was passed to browser.cookies.remove with the cookie name, it returned null and cookie was not deleted.

i.e. browser.cookies.remove({url: "http://portal.bizagi.com/en/component/wordpress/?Itemid=1022/", name: "wordpress_logged_in_1f139463967a86d7839c7ded0baee623"})

Expected results:

cookie should have been deleted.

Severity: -- → S3
Priority: -- → P3

Hello,

Using the attached extension, I’ve managed to reproduce the issue on the latest Nightly (81.0a1/20200728213249), Beta (80.0b1/20200728204253) and Release (79.0/20200720193547) under Windows 10 Pro 64-bit and Ubuntu 16.04 LTS.

Based on the fact that the extensions should create and remove the cookie, the Storage tab from the webconsole shows the cookie is indeed created but not deleted. The extension console results also back up this fact as the browser.cookies.remove result is null and the browser.cookies.getAll result after cookie.remove: still returns the cookie information.

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1440263
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: