Closed Bug 1947240 Opened 4 months ago Closed 4 months ago

Unable to delete cookies with Domain attributes

Categories

(DevTools :: Storage Inspector, defect, P2)

Firefox 136
defect

Tracking

(firefox-esr128 unaffected, firefox135 wontfix, firefox136 fixed, firefox137 fixed)

RESOLVED FIXED
137 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox135 --- wontfix
firefox136 --- fixed
firefox137 --- fixed

People

(Reporter: kodo, Assigned: nchevobbe)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

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

Steps to reproduce:

  1. go (in private window if you want) to login.microsoftonline.com (possibly other sites also, just spotted on this one)
  2. open developer tools (right click-inspect)
  3. go to storage - cookies - right click - delete all cookies

Actual results:

Some session cookies are not deleted and stay there. Tested in Firefox 135 and 136 (currently in beta just to test, 135 stable has same behavior). You can still delete all cookies from Settings - Manage Data.

Expected results:

All cookies were deleted previously from developer tools.

The Bugbug bot thinks this bug should belong to the 'DevTools::Storage Inspector' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Storage Inspector
Product: Firefox → DevTools

Indeed, used to work with ESR, Nicolas will take a look

Flags: needinfo?(nchevobbe)

This was regressed by Bug 1907570 , I'll have a look

Flags: needinfo?(nchevobbe)
Keywords: regression
Regressed by: 1907570

Thanks! Confirming + P2/S3 since this is a recent regression/

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Summary: Unable to delete all cookies from developer tools → Unable to delete cookies with Domain attributes

The _removeCookies method had its own (faulty) host matching function,
which was buggy for cookies with domain.
The class already has a isCookieAtHost method, which doesn't have
the faulty check, so we use this instead.
A test case is added in browser_storage_cookies_delete_all.js.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

Set release status flags based on info from the regressing bug 1907570

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8eadda1ece05 [devtools] Fix deleting cookies with Domain attributes in Storage panel. r=devtools-reviewers,jdescottes.

the cleanup function was only handling the last opened tab and my patch make a test add a second tab. I fixed the cleanup function

Flags: needinfo?(nchevobbe)
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8b385a2d7056 [devtools] Fix deleting cookies with Domain attributes in Storage panel. r=devtools-reviewers,jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
Flags: in-testsuite+

The patch landed in nightly and beta is affected.
:nchevobbe, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox136 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(nchevobbe)
Flags: needinfo?(nchevobbe)

The _removeCookies method had its own (faulty) host matching function,
which was buggy for cookies with domain.
The class already has a isCookieAtHost method, which doesn't have
the faulty check, so we use this instead.
A test case is added in browser_storage_cookies_delete_all.js.

Adding a new tab in the test revealed that the cleanup function was only
calling window.clear for the last opened tab, so we now do it for all the
tabs we're closing.

Original Revision: https://phabricator.services.mozilla.com/D238012

Attachment #9466605 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: can't delete some cookies from DevTools storage panel
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: -
  • Risk associated with taking this patch: low
  • Explanation of risk level: DevTools only fix, re-using existing helper, covered by mochitest
  • String changes made/needed: -
  • Is Android affected?: yes
Attachment #9466605 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Duplicate of this bug: 1950753
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size:

OSZAR »