{"action":"created","issue":{"url":"https://api.github.com/repos/bjeavons/zxcvbn-php/issues/16","repository_url":"https://api.github.com/repos/bjeavons/zxcvbn-php","labels_url":"https://api.github.com/repos/bjeavons/zxcvbn-php/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/bjeavons/zxcvbn-php/issues/16/comments","events_url":"https://api.github.com/repos/bjeavons/zxcvbn-php/issues/16/events","html_url":"https://github.com/bjeavons/zxcvbn-php/pull/16","id":177468347,"number":16,"title":"Fix user inputs incorrectly affecting scores","user":{"login":"michaelmoussa","id":183833,"avatar_url":"https://avatars3.githubusercontent.com/u/183833?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelmoussa","html_url":"https://github.com/michaelmoussa","followers_url":"https://api.github.com/users/michaelmoussa/followers","following_url":"https://api.github.com/users/michaelmoussa/following{/other_user}","gists_url":"https://api.github.com/users/michaelmoussa/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelmoussa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelmoussa/subscriptions","organizations_url":"https://api.github.com/users/michaelmoussa/orgs","repos_url":"https://api.github.com/users/michaelmoussa/repos","events_url":"https://api.github.com/users/michaelmoussa/events{/privacy}","received_events_url":"https://api.github.com/users/michaelmoussa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-16T16:33:53Z","updated_at":"2017-08-19T00:37:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bjeavons/zxcvbn-php/pulls/16","html_url":"https://github.com/bjeavons/zxcvbn-php/pull/16","diff_url":"https://github.com/bjeavons/zxcvbn-php/pull/16.diff","patch_url":"https://github.com/bjeavons/zxcvbn-php/pull/16.patch"},"body":"**Case 1: User input having named keys**\n\nIt's not uncommon to want to take things like a user's name, username, email address, and other user metadata into account when evaluating password strength. These items may already already be available in a string-keyed array such as `['name' => 'bob', 'email' => 'bob@example.com']`. The present implementation will use the string key as the input rank, which causes an error when attempting to take the `log()` of it.\n\nThis is fixed by setting the rank of any user input that has a string key to whatever its numerical position in the user input array is.\n\n**Case 2: Matching user input with rank 0 scoring incorrectly**\n\n`correct horse battery staple` with no user input would score a 4, but the same password with `['c']` as the user input changes the score to 0 (which is obviously not correct). This is because a rank of 0 causes an entropy score of `-INF`, which causes the crack time to evaluate to 0.\n\nThis is fixed by ensuring the minimum rank that can be assigned to a value is `1`. Any reasonable number would work, but `1` seemed like a fair default, since the default behavior is to use the array index, and `1` is the lowest nonzero positive integer.\n"},"comment":{"url":"https://api.github.com/repos/bjeavons/zxcvbn-php/issues/comments/323488406","html_url":"https://github.com/bjeavons/zxcvbn-php/pull/16#issuecomment-323488406","issue_url":"https://api.github.com/repos/bjeavons/zxcvbn-php/issues/16","id":323488406,"user":{"login":"madscientist159","id":5959326,"avatar_url":"https://avatars1.githubusercontent.com/u/5959326?v=4","gravatar_id":"","url":"https://api.github.com/users/madscientist159","html_url":"https://github.com/madscientist159","followers_url":"https://api.github.com/users/madscientist159/followers","following_url":"https://api.github.com/users/madscientist159/following{/other_user}","gists_url":"https://api.github.com/users/madscientist159/gists{/gist_id}","starred_url":"https://api.github.com/users/madscientist159/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madscientist159/subscriptions","organizations_url":"https://api.github.com/users/madscientist159/orgs","repos_url":"https://api.github.com/users/madscientist159/repos","events_url":"https://api.github.com/users/madscientist159/events{/privacy}","received_events_url":"https://api.github.com/users/madscientist159/received_events","type":"User","site_admin":false},"created_at":"2017-08-19T00:37:28Z","updated_at":"2017-08-19T00:37:28Z","body":"Stumbled across this library earlier today but unhandled requests like this one make me nervous that the library is not being maintained.  Should I be looking elsewhere?"}}
{"actor":{"display_login":"madscientist159"}}