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

Reduce the entropy value for empty string: 3 -> 1 closes #1399 #1420

Closed
wants to merge 1 commit into from

Conversation

cowlicks
Copy link
Contributor

@cowlicks cowlicks commented Jun 8, 2017

closes #1399

It seems like the empty string shouldn't have more than one bit of information.

@ghostwords
Copy link
Member

How did you go about testing this change?

@cowlicks
Copy link
Contributor Author

cowlicks commented Jun 8, 2017

@ghostwords paste this in the background page while on this branch:

let details = {'requestHeaders': [
  {'name': 'cookie', 'value': "uid=; path=/; expires=Thu, 25 May 2017 16:29:49 GMT; domain=medium.com; secure; httponly"},
  {'name': 'cookie', 'value': "uid=; path=/; expires=Thu, 25 May 2017 16:29:49 GMT; domain=medium.com; secure; httponly"},
  {'name': 'cookie', 'value': "uid=; path=/; expires=Thu, 25 May 2017 16:29:49 GMT; domain=medium.com; secure; httponly"},
  {'name': 'cookie', 'value': "uid=; path=/; expires=Thu, 25 May 2017 16:29:49 GMT; domain=medium.com; secure; httponly"},
  {'name': 'cookie', 'value': "uid=; path=/; expires=Thu, 25 May 2017 16:29:49 GMT; domain=medium.com; secure; httponly"},
  {'name': 'cookie', 'value': "uid=; path=/; expires=Thu, 25 May 2017 16:29:49 GMT; domain=medium.com; secure; httponly"},
  {'name': 'cookie', 'value': "uid=; path=/; expires=Thu, 25 May 2017 16:29:49 GMT; domain=medium.com; secure; httponly"},
  {'name': 'cookie', 'value': "uid=; path=/; expires=Thu, 25 May 2017 16:29:49 GMT; domain=medium.com; secure; httponly"},
]};

console.log(HeuristicBlocking.hasCookieTracking(details, 'foo'));
@ghostwords
Copy link
Member

Could you find out why we assigned 3 for empty strings in the first place, and whether 1 makes sense conceptually? I would discuss this with @pde.

@ghostwords
Copy link
Member

ghostwords commented Jun 8, 2017

I would also like to understand what effect this change will have on actual browsing. You can add some code that flags cookies with empty strings for review (by printing just those situations to the console, let's say) and then visit a bunch of sites (in a new profile) before and (again in a new profile) after this patch.

@cowlicks cowlicks changed the title Reduce the entropy value for empty string: 3 -> 1 Jun 11, 2017
@cowlicks cowlicks closed this Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants