{"action":"created","issue":{"url":"https://api.github.com/repos/EFForg/privacybadger/issues/771","repository_url":"https://api.github.com/repos/EFForg/privacybadger","labels_url":"https://api.github.com/repos/EFForg/privacybadger/issues/771/labels{/name}","comments_url":"https://api.github.com/repos/EFForg/privacybadger/issues/771/comments","events_url":"https://api.github.com/repos/EFForg/privacybadger/issues/771/events","html_url":"https://github.com/EFForg/privacybadger/issues/771","id":141422186,"number":771,"title":"Better heuristic for high entropy cookies","user":{"login":"cooperq","id":64981,"avatar_url":"https://avatars.githubusercontent.com/u/64981?v=3","gravatar_id":"","url":"https://api.github.com/users/cooperq","html_url":"https://github.com/cooperq","followers_url":"https://api.github.com/users/cooperq/followers","following_url":"https://api.github.com/users/cooperq/following{/other_user}","gists_url":"https://api.github.com/users/cooperq/gists{/gist_id}","starred_url":"https://api.github.com/users/cooperq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooperq/subscriptions","organizations_url":"https://api.github.com/users/cooperq/orgs","repos_url":"https://api.github.com/users/cooperq/repos","events_url":"https://api.github.com/users/cooperq/events{/privacy}","received_events_url":"https://api.github.com/users/cooperq/received_events","type":"User","site_admin":false},"labels":[{"id":47277671,"url":"https://api.github.com/repos/EFForg/privacybadger/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":121133623,"url":"https://api.github.com/repos/EFForg/privacybadger/labels/Good%20Volunteer%20Task","name":"Good Volunteer Task","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":{"login":"cooperq","id":64981,"avatar_url":"https://avatars.githubusercontent.com/u/64981?v=3","gravatar_id":"","url":"https://api.github.com/users/cooperq","html_url":"https://github.com/cooperq","followers_url":"https://api.github.com/users/cooperq/followers","following_url":"https://api.github.com/users/cooperq/following{/other_user}","gists_url":"https://api.github.com/users/cooperq/gists{/gist_id}","starred_url":"https://api.github.com/users/cooperq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooperq/subscriptions","organizations_url":"https://api.github.com/users/cooperq/orgs","repos_url":"https://api.github.com/users/cooperq/repos","events_url":"https://api.github.com/users/cooperq/events{/privacy}","received_events_url":"https://api.github.com/users/cooperq/received_events","type":"User","site_admin":false},"assignees":[{"login":"cooperq","id":64981,"avatar_url":"https://avatars.githubusercontent.com/u/64981?v=3","gravatar_id":"","url":"https://api.github.com/users/cooperq","html_url":"https://github.com/cooperq","followers_url":"https://api.github.com/users/cooperq/followers","following_url":"https://api.github.com/users/cooperq/following{/other_user}","gists_url":"https://api.github.com/users/cooperq/gists{/gist_id}","starred_url":"https://api.github.com/users/cooperq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooperq/subscriptions","organizations_url":"https://api.github.com/users/cooperq/orgs","repos_url":"https://api.github.com/users/cooperq/repos","events_url":"https://api.github.com/users/cooperq/events{/privacy}","received_events_url":"https://api.github.com/users/cooperq/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/EFForg/privacybadger/milestones/11","html_url":"https://github.com/EFForg/privacybadger/milestone/11","labels_url":"https://api.github.com/repos/EFForg/privacybadger/milestones/11/labels","id":2107573,"number":11,"title":"Privacy Badger 2.1","description":"","creator":{"login":"cooperq","id":64981,"avatar_url":"https://avatars.githubusercontent.com/u/64981?v=3","gravatar_id":"","url":"https://api.github.com/users/cooperq","html_url":"https://github.com/cooperq","followers_url":"https://api.github.com/users/cooperq/followers","following_url":"https://api.github.com/users/cooperq/following{/other_user}","gists_url":"https://api.github.com/users/cooperq/gists{/gist_id}","starred_url":"https://api.github.com/users/cooperq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooperq/subscriptions","organizations_url":"https://api.github.com/users/cooperq/orgs","repos_url":"https://api.github.com/users/cooperq/repos","events_url":"https://api.github.com/users/cooperq/events{/privacy}","received_events_url":"https://api.github.com/users/cooperq/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":0,"state":"open","created_at":"2016-11-01T18:36:21Z","updated_at":"2016-12-08T17:08:16Z","due_on":"2016-12-10T00:00:00Z","closed_at":null},"comments":2,"created_at":"2016-03-16T22:33:19Z","updated_at":"2016-12-08T17:10:49Z","closed_at":null,"body":"I think that there is a better heuristic possible for estimating cookie entropy, it probably looks something like this: \n\n``` javascript\nvar str = '103affFfffff';\nvar maxPossibleSymbols = 0;\nvar maxCombinations = 0;\nvar maxBits = 0;\n\nif(/[a-z]+/.test(str)){ maxPossibleSymbols += 26; } //lower alpha\nif(/[A-Z]+/.test(str)){ maxPossibleSymbols += 26; } //upper alpha\nif(/[0-9]+/.test(str)){ maxPossibleSymbols += 10; } //numeric\nif(/[_\\W]/.test(str)){ maxPossibleSymbols += 32; } // punctuation\nif(str.match(/^[a-f0-9]+$/i)){ maxPossibleSymbols = 16; } // hex\nif(str.match(/^[01]+$/i)){ maxPossibleSymbols = 2; } // binary\nif(str.match(/^true|false|opt-out|outout|opt_out|nodata|no_data|no-data|yes|no$/i)){ maxPossibleSymbols = 2;\nmaxCombinations=2;} // binary\nif(!maxCombinations){\n    maxCombinations = Math.pow(maxPossibleSymbols, str.length);\n}\nmaxEntropy = Math.log(maxCombinations)/Math.LN2;\nconsole.log(maxPossibleSymbols, maxCombinations, maxEntropy)\nreturn maxEntropy;\n```\n"},"comment":{"url":"https://api.github.com/repos/EFForg/privacybadger/issues/comments/265796315","html_url":"https://github.com/EFForg/privacybadger/issues/771#issuecomment-265796315","issue_url":"https://api.github.com/repos/EFForg/privacybadger/issues/771","id":265796315,"user":{"login":"cooperq","id":64981,"avatar_url":"https://avatars.githubusercontent.com/u/64981?v=3","gravatar_id":"","url":"https://api.github.com/users/cooperq","html_url":"https://github.com/cooperq","followers_url":"https://api.github.com/users/cooperq/followers","following_url":"https://api.github.com/users/cooperq/following{/other_user}","gists_url":"https://api.github.com/users/cooperq/gists{/gist_id}","starred_url":"https://api.github.com/users/cooperq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooperq/subscriptions","organizations_url":"https://api.github.com/users/cooperq/orgs","repos_url":"https://api.github.com/users/cooperq/repos","events_url":"https://api.github.com/users/cooperq/events{/privacy}","received_events_url":"https://api.github.com/users/cooperq/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T17:10:49Z","updated_at":"2016-12-08T17:10:49Z","body":"Depends on #1019 "}}
{"actor":{"display_login":"cooperq"}}