cookie-quick-manager icon indicating copy to clipboard operation
cookie-quick-manager copied to clipboard

cookies without a domain cannot be deleted

Open practik opened this issue 6 years ago • 2 comments

Steps to reproduce:

  1. Go to any page of a website that uses cookies and save a copy to your computer.
  2. Open the local copy in the browser.
  3. Check Cookie Quick Manager. The local webpage will be at the top of the Domains list with no domain name, just a number.
  4. Select a cookie from the local webpage and click the right-hand trash can icon to delete it.

Expected results: The cookie should be deleted.

Actual results: The delete icon turns red and the cookie is not deleted.

Cookie Quick Manager 0.3rc2 on Firefox 60.0.1 on macOS PS: Thanks for all the work you put into the latest update, @ysard!

practik avatar Jul 03 '18 16:07 practik

Hi, thank you for the feedback, the issue is from Firefox itself and is now reported on Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1473412

wait & see :p

ysard avatar Jul 04 '18 21:07 ysard

@ysard I just noticed this issue as well. You can clean these cookies by prefixing file://

Here is a simplified version of the code I use in my extension:

function getCookieRemoveURL(cookie: Cookies.Cookie) {
    if (cookie.domain.length === 0)
        return `file://${cookie.path}`;
    const rawDomain = cookie.domain.startsWith(".") ? cookie.domain.substr(1) : cookie.domain;
    return (cookie.secure ? "https://" : "http://") + rawDomain + cookie.path;
}

Lusito avatar Aug 04 '19 13:08 Lusito