{"action":"created","issue":{"url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/226","repository_url":"https://api.github.com/repos/keepassxreboot/keepassxc","labels_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/226/comments","events_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/226/events","html_url":"https://github.com/keepassxreboot/keepassxc/pull/226","id":203523588,"number":226,"title":"Fixes #199 : Disable buttonGenerate when no classes.","user":{"login":"louib","id":3301383,"avatar_url":"https://avatars.githubusercontent.com/u/3301383?v=3","gravatar_id":"","url":"https://api.github.com/users/louib","html_url":"https://github.com/louib","followers_url":"https://api.github.com/users/louib/followers","following_url":"https://api.github.com/users/louib/following{/other_user}","gists_url":"https://api.github.com/users/louib/gists{/gist_id}","starred_url":"https://api.github.com/users/louib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louib/subscriptions","organizations_url":"https://api.github.com/users/louib/orgs","repos_url":"https://api.github.com/users/louib/repos","events_url":"https://api.github.com/users/louib/events{/privacy}","received_events_url":"https://api.github.com/users/louib/received_events","type":"User","site_admin":false},"labels":[{"id":333293071,"url":"https://api.github.com/repos/keepassxreboot/keepassxc/labels/bug","name":"bug","color":"e0453a","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/keepassxreboot/keepassxc/milestones/4","html_url":"https://github.com/keepassxreboot/keepassxc/milestone/4","labels_url":"https://api.github.com/repos/keepassxreboot/keepassxc/milestones/4/labels","id":2272644,"number":4,"title":"v2.1.1","description":"2.1.1 Bugfix release","creator":{"login":"phoerious","id":911270,"avatar_url":"https://avatars.githubusercontent.com/u/911270?v=3","gravatar_id":"","url":"https://api.github.com/users/phoerious","html_url":"https://github.com/phoerious","followers_url":"https://api.github.com/users/phoerious/followers","following_url":"https://api.github.com/users/phoerious/following{/other_user}","gists_url":"https://api.github.com/users/phoerious/gists{/gist_id}","starred_url":"https://api.github.com/users/phoerious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoerious/subscriptions","organizations_url":"https://api.github.com/users/phoerious/orgs","repos_url":"https://api.github.com/users/phoerious/repos","events_url":"https://api.github.com/users/phoerious/events{/privacy}","received_events_url":"https://api.github.com/users/phoerious/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":7,"state":"open","created_at":"2017-01-23T21:12:11Z","updated_at":"2017-01-27T01:27:34Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2017-01-26T23:50:08Z","updated_at":"2017-01-27T01:27:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/226","html_url":"https://github.com/keepassxreboot/keepassxc/pull/226","diff_url":"https://github.com/keepassxreboot/keepassxc/pull/226.diff","patch_url":"https://github.com/keepassxreboot/keepassxc/pull/226.patch"},"body":"## Description\r\n\r\nThe presence of at least 1 character class was not verified before generating a new password, resulting in the following line https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/PasswordGenerator.cpp#L52 crashing the program.\r\n\r\nNote that the validity was checked when calling `PasswordGeneratorWidget::regeneratePassword`, but was not checked when calling `PasswordGeneratorWidget::generatePassword`. The `Generate` button is now disabled if the generator is in an invalid state.\r\n\r\nEven though now we should never call `PasswordGeneratorWidget::generatePassword` with an invalid password generator, I added the `isValid()` verification for robustness and for consistency with `regeneratePassword`.\r\n\r\n## Motivation and Context\r\nFixes #199\r\n\r\n## How Has This Been Tested?\r\nUnit tests + manual tests (on MacOs).\r\n\r\n## Screenshots (if appropriate):\r\nGenerate button is enabled when at least 1 character class : \r\n![screen shot 2017-01-26 at 6 32 31 pm](https://cloud.githubusercontent.com/assets/3301383/22355184/38634024-e3f7-11e6-8a5c-291715eba9f4.png)\r\n\r\nGenerate button is disabled when no class selected :\r\n![screen shot 2017-01-26 at 6 32 52 pm](https://cloud.githubusercontent.com/assets/3301383/22355207/58a9a684-e3f7-11e6-97ee-2a8f0fcfbc0c.png)\r\n\r\nAt some point it could be useful to add an error message stating why the `Generate` button is disabled.\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? -->\r\n<!--- Please remove all lines which don't apply. -->\r\n- ✅ Bug fix (non-breaking change which fixes an issue)\r\n\r\n## Checklist:\r\n<!--- Please go over all the following points. -->\r\n<!--- Again, remove any lines which don't apply. -->\r\n<!--- Pull Requests that don't fulfill all [REQUIRED] requisites are likely -->\r\n<!--- to be sent back to you for correction or will be rejected.  -->\r\n- ✅ I have read the **CONTRIBUTING** document. **[REQUIRED]**\r\n- ✅ My code follows the code style of this project. **[REQUIRED]**\r\n- ✅ All new and existing tests passed. **[REQUIRED]**\r\n"},"comment":{"url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/comments/275566199","html_url":"https://github.com/keepassxreboot/keepassxc/pull/226#issuecomment-275566199","issue_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/226","id":275566199,"user":{"login":"phoerious","id":911270,"avatar_url":"https://avatars.githubusercontent.com/u/911270?v=3","gravatar_id":"","url":"https://api.github.com/users/phoerious","html_url":"https://github.com/phoerious","followers_url":"https://api.github.com/users/phoerious/followers","following_url":"https://api.github.com/users/phoerious/following{/other_user}","gists_url":"https://api.github.com/users/phoerious/gists{/gist_id}","starred_url":"https://api.github.com/users/phoerious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoerious/subscriptions","organizations_url":"https://api.github.com/users/phoerious/orgs","repos_url":"https://api.github.com/users/phoerious/repos","events_url":"https://api.github.com/users/phoerious/events{/privacy}","received_events_url":"https://api.github.com/users/phoerious/received_events","type":"User","site_admin":false},"created_at":"2017-01-27T01:27:33Z","updated_at":"2017-01-27T01:27:33Z","body":"Huh? No need to close this yet."}}
{"actor":{"display_login":"phoerious"}}