Giter Club home page Giter Club logo

Comments (4)

ysard avatar ysard commented on July 23, 2024

Hi,
whether it's a HttpOnly cookie or not, you only need these arguments for the remove() function:

let params = {
    url: vAPI.getHostUrl(cookie), 
    name: cookie.name,
    storeId: cookie.storeId,
};

Take a look at the function getHostUrl() to forge your url with the attributes cookie.secure, cookie.domain, cookie.path.
You can add an additional key if First Party Domain is activated on the cookie you want to delete:
firstPartyDomain

from cookie-quick-manager.

iamadamdev avatar iamadamdev commented on July 23, 2024

Interesting, that doesn't look very much different than what I have in my extension except mine is unable to remove HttpOnly cookies:

https://github.com/iamadamdev/bypass-paywalls-firefox/blob/master/background.js#L258

maybe the issue is something else then.

from cookie-quick-manager.

ysard avatar ysard commented on July 23, 2024

First, don't forget that firstPartyDomain is mandatory if the browser has first-party isolation enabled. Your code does not handle this case.
(https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies/remove)

Then, pay attention to your inline condition that does not do what you would like it to do:

var a = true;
var b = a ? "https://" : "http://" + "path";
console.log(b);
>> "https://"
var b = (a ? "https://" : "http://") + "path";
console.log(b);
>> "https://path"

hoping that your bug is now resolved :)

from cookie-quick-manager.

iamadamdev avatar iamadamdev commented on July 23, 2024

Thanks so much! that fixed it.

from cookie-quick-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.