Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cookie counter on subdomains always zero #801

Closed
Tibladar opened this issue Jul 14, 2020 · 5 comments · Fixed by #823
Closed

[BUG] Cookie counter on subdomains always zero #801

Tibladar opened this issue Jul 14, 2020 · 5 comments · Fixed by #823
Assignees
Labels
bug Verified Bugs Firefox Items related to Mozilla Firefox
Milestone

Comments

@Tibladar
Copy link

Describe the bug

The cookie counter on websites with a subdomain like https://en.wikipedia.org/ is always zero, even when there are cookies clearly set and also deleted when leaving the sites.
Manual delete doesn't work as it shows 'No cookies found'.

On sites without a subdomain like https://github.com/ it works fine.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://en.wikipedia.org/
  2. Open the addon menu
  3. See '0 cookies'
  4. Open browser console and go to Storage Inspector

Expected behavior

The cookies should get counted properly

Screenshots

image

Your System Info (please complete the following information):

  • OS: Ubuntu 20.04
  • Browser Info: Firefox 78.0.1
  • CookieAutoDelete Version: latest™ 3.4.0
@Tibladar Tibladar added the untested bug/issue Issues that have yet to be tested as per instructions label Jul 14, 2020
@kennethtran93
Copy link
Member

kennethtran93 commented Jul 14, 2020

Hmmm...It seems to be working in mine (at least the cookie counter in subdomains).
Screenshot_20200714_130158
Ubuntu 18.04 with Firefox 78.0.2.

At the moment we only count the cookies created in the subdomains. This is the same with manual cleaning. Otherwise cleaning the main domains may affect cookies stored through other subdomains and may brake other sites (e.g. authentications from subdomains passed through the main domain).

Not to mention that some subdomains aren't affiliated with the main domain (e.g. free hosting providers).

As a sidenote, do you have firstpartyisolate enabled?

@kennethtran93 kennethtran93 added support cannot reproduce Cannot reproduce issue - more specific details/instructions needed and removed untested bug/issue Issues that have yet to be tested as per instructions labels Jul 14, 2020
@Tibladar
Copy link
Author

Tibladar commented Jul 15, 2020

At the moment we only count the cookies created in the subdomains. This is the same with manual cleaning.

That sounds good

As a sidenote, do you have firstpartyisolate enabled?

Yes, disabling makes the counter work.
Maybe related to privacy.firstparty.isolate.use_site

@kennethtran93
Copy link
Member

kennethtran93 commented Jul 16, 2020

As a sidenote, do you have firstpartyisolate enabled?

Yes, disabling makes the counter work.

Surprisingly in my tests, testing privacy.firstparty.isolate for both true/false still shows same result that I had before.

Maybe related to privacy.firstparty.isolate.use_site

That was only freshly added in 78.0.1 and I don't have a clue what that is about. Currently defaults to false. I won't consider it a bug at this point until I understand exactly what that does.

@kennethtran93 kennethtran93 self-assigned this Jul 16, 2020
@Tibladar
Copy link
Author

Tibladar commented Jul 16, 2020

Surprisingly in my tests, testing privacy.firstparty.isolate for both true/false still shows same result that I had before.

It seems to be privacy.firstparty.isolate.use_site with privacy.firstparty.isolate enabled.
You may need to clear the site's cookies in order to see a different result.

until I understand exactly what that does.

Looking at the changeset https://hg.mozilla.org/integration/autoland/rev/a77c31684931#l2.12 and its ticket https://bugzilla.mozilla.org/show_bug.cgi?id=1637516 it seems to change the use from the old GetBaseDomain (eTLD+1) to a specific site which doesn't ignore the used scheme like the old one.
Because there's a new string I suspect the old domain matching doesn't work anymore.

@kennethtran93
Copy link
Member

kennethtran93 commented Jul 20, 2020

From the changeset given, it looks like it does the following if use_site is adding round brackets with schemes and ports...

+  site.AssignLiteral("(");
+  site.Append(aScheme);
+  site.Append(",");
+  site.Append(aHost);
+  if (aPort != -1) {
+    site.Append(",");
+    site.AppendInt(aPort);
+  }
+  site.AppendLiteral(")");

So here's my findings:

privacy.firstparty.isolate.use_site setting firstPartyDomain cookie property value
Enabled (https,wikipedia.org)
Disabled wikipedia.org

Which means I now not only need to detect if firstPartyDomain (via the workaround so I don't need to request privacy permission), I also need to check the firstPartyDomain given for a cookie...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified Bugs Firefox Items related to Mozilla Firefox
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants