forget-me-not: Cookie rules don't apply to all cookies on the domain
When I add a rule to Forget Me Not, it doesn’t seem to apply to all cookies from that domain. This is making it impossible to login to sites like Yahoo Mail.
Steps to reproduce:
- Clear the Forget Me Not log.
- Create a rule for *.yahoo.com. My rule is set to “Forget”
- Go to mail.yahoo.com
- Look at the Forget Me Not log.
What I expect to see are a couple of domains listed with cookies that are allowed. What I actually see is a cookie that was allowed from login.yahoo.com
and a blocked cookie from yahoo.com AS
. I suspect that the issue lies with the AS
that shows up after the domain. I’ve also seen T
, NID
, and CGIC
after domains, but I have no idea what they mean. I tried looking at the source code, but that didn’t shed any light on it either. What do those letters after the domain mean?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 30 (15 by maintainers)
same problem happend for me on LinkedIn, the server actually send separate Set-Cookie headers for every cookie but for some reason the
parseSetCookieHeader
function receive multiple cookies separed by line feeds like this:this breaks the matching for the domain and also discard the rest of the cookies, for example the matched domain will be
.www.linkedin.com\nlang
instead of.www.linkedin.com
, and KEY2 to KEY5 are not extracted either. i’m testing directly on the latest develop branch on Firefox Developer Edition 66.0b5, just modified thenpm-run-all
version to^4.1.5
to fix this error:So, my research says, that in a deprecated standard for the set-cookie header, it was allowed to set multiple cookies in one set-cookie header. This is not allowed anymore, but some gateways may do this to compress http headers in order to reduce data. Since on my end, yahoo sends me multiple set-cookie headers, instead of one, I can only assume, that your gateway is doing this.
Obviously, even tho the gateway should be fixed, I will have to add a fix for FMN as well (since others might have this issue). I will try to implement a fix for this for the next version, but maybe you can check your router if there is some kind of header compression in place for a quick fix.