{"action":"created","comment":{"url":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/comments/125657672","pull_request_review_id":48068300,"id":125657672,"diff_hunk":"@@ -784,3 +791,29 @@ QString Entry::resolvePlaceholder(const QString& str) const\n \n     return result;\n }\n+\n+QString Entry::resolveUrl(const QString& url) const\n+{\n+#ifdef WITH_XC_HTTP\n+    QString newurl = url;","path":"src/core/Entry.cpp","position":29,"original_position":29,"commit_id":"16692ec8367310fb1b3dcc3be9c960da6bad257b","original_commit_id":"16692ec8367310fb1b3dcc3be9c960da6bad257b","user":{"login":"louib","id":3301383,"avatar_url":"https://avatars0.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},"body":"@TheZ3ro newUrl","created_at":"2017-07-05T14:25:19Z","updated_at":"2017-07-05T14:25:19Z","html_url":"https://github.com/keepassxreboot/keepassxc/pull/719#discussion_r125657672","pull_request_url":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/719","_links":{"self":{"href":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/comments/125657672"},"html":{"href":"https://github.com/keepassxreboot/keepassxc/pull/719#discussion_r125657672"},"pull_request":{"href":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/719"}}},"pull_request":{"url":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/719","id":128217227,"html_url":"https://github.com/keepassxreboot/keepassxc/pull/719","diff_url":"https://github.com/keepassxreboot/keepassxc/pull/719.diff","patch_url":"https://github.com/keepassxreboot/keepassxc/pull/719.patch","issue_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/719","number":719,"state":"open","locked":false,"title":"Fix correct favicon downloading","user":{"login":"TheZ3ro","id":686894,"avatar_url":"https://avatars3.githubusercontent.com/u/686894?v=3","gravatar_id":"","url":"https://api.github.com/users/TheZ3ro","html_url":"https://github.com/TheZ3ro","followers_url":"https://api.github.com/users/TheZ3ro/followers","following_url":"https://api.github.com/users/TheZ3ro/following{/other_user}","gists_url":"https://api.github.com/users/TheZ3ro/gists{/gist_id}","starred_url":"https://api.github.com/users/TheZ3ro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheZ3ro/subscriptions","organizations_url":"https://api.github.com/users/TheZ3ro/orgs","repos_url":"https://api.github.com/users/TheZ3ro/repos","events_url":"https://api.github.com/users/TheZ3ro/events{/privacy}","received_events_url":"https://api.github.com/users/TheZ3ro/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the title above -->\r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\nThe user provided URL field can contain various protocol URL other than `http` and `https` (like `cmd`, `ftp`, `sftp`, etc)\r\nThis PR adds an entry method called `webUrl` that takes the url field, checks if it's web-friendly (check if the protocol is `http` or `https`, adds `https` by default if the protocol is missing, tries to extract the url from `cmd` protocol, ...)\r\nThe `webUrl` is then used for downloadingFavicon and for the KeePassHTTP protocol.\r\n\r\nIf the website don't support `https`, the request will timeout so we need to retry under `http`\r\n\r\nThis fixes #238 and #240 \r\n\r\n## How has this been tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\nWriting tests for this is pretty painful.\r\nI've tested this manually with the following url:\r\n- `www.google.com` *url without protocol* -> fetch icon for `https://www.google.com`\r\n- `www.stealmylogin.com` *url without protocol, website without https* -> checks the `https` favicon but fails for timeout and then fetch icon for the `http` version\r\n- `cmd://firefox www.google.com` *cmd with url as first command argument* -> fetch icon for `https://www.google.com`\r\n- `cmd://firefox \"http://no-favicon.com/\"` *cmd with url inside quote, unavailable website* -> report `Unable to fetch favicon`\r\n- `ftp://8.8.8.8` *ftp protocol* -> favicon download button is hidden.\r\n\r\nIf someone wants to try to write tests for this, I would be very happy :smile: \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- ✅ I have compiled and verified my code with `-DWITH_ASAN=ON`. **[REQUIRED]**\r\n\r\n","created_at":"2017-06-29T18:27:39Z","updated_at":"2017-07-05T14:25:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9863a718063821034a5710b59227f723c5fde76c","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/keepassxreboot/keepassxc/milestones/9","html_url":"https://github.com/keepassxreboot/keepassxc/milestone/9","labels_url":"https://api.github.com/repos/keepassxreboot/keepassxc/milestones/9/labels","id":2551255,"number":9,"title":"v2.2.1","description":"Minor release to fix issues not initially closed in v2.2.0","creator":{"login":"droidmonkey","id":2809491,"avatar_url":"https://avatars1.githubusercontent.com/u/2809491?v=3","gravatar_id":"","url":"https://api.github.com/users/droidmonkey","html_url":"https://github.com/droidmonkey","followers_url":"https://api.github.com/users/droidmonkey/followers","following_url":"https://api.github.com/users/droidmonkey/following{/other_user}","gists_url":"https://api.github.com/users/droidmonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/droidmonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droidmonkey/subscriptions","organizations_url":"https://api.github.com/users/droidmonkey/orgs","repos_url":"https://api.github.com/users/droidmonkey/repos","events_url":"https://api.github.com/users/droidmonkey/events{/privacy}","received_events_url":"https://api.github.com/users/droidmonkey/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":18,"state":"open","created_at":"2017-05-30T18:19:21Z","updated_at":"2017-07-03T03:23:22Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/719/commits","review_comments_url":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/719/comments","review_comment_url":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/719/comments","statuses_url":"https://api.github.com/repos/keepassxreboot/keepassxc/statuses/16692ec8367310fb1b3dcc3be9c960da6bad257b","head":{"label":"keepassxreboot:fix/improveDownloadFavicon","ref":"fix/improveDownloadFavicon","sha":"16692ec8367310fb1b3dcc3be9c960da6bad257b","user":{"login":"keepassxreboot","id":22534815,"avatar_url":"https://avatars0.githubusercontent.com/u/22534815?v=3","gravatar_id":"","url":"https://api.github.com/users/keepassxreboot","html_url":"https://github.com/keepassxreboot","followers_url":"https://api.github.com/users/keepassxreboot/followers","following_url":"https://api.github.com/users/keepassxreboot/following{/other_user}","gists_url":"https://api.github.com/users/keepassxreboot/gists{/gist_id}","starred_url":"https://api.github.com/users/keepassxreboot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keepassxreboot/subscriptions","organizations_url":"https://api.github.com/users/keepassxreboot/orgs","repos_url":"https://api.github.com/users/keepassxreboot/repos","events_url":"https://api.github.com/users/keepassxreboot/events{/privacy}","received_events_url":"https://api.github.com/users/keepassxreboot/received_events","type":"Organization","site_admin":false},"repo":{"id":52729242,"name":"keepassxc","full_name":"keepassxreboot/keepassxc","owner":{"login":"keepassxreboot","id":22534815,"avatar_url":"https://avatars0.githubusercontent.com/u/22534815?v=3","gravatar_id":"","url":"https://api.github.com/users/keepassxreboot","html_url":"https://github.com/keepassxreboot","followers_url":"https://api.github.com/users/keepassxreboot/followers","following_url":"https://api.github.com/users/keepassxreboot/following{/other_user}","gists_url":"https://api.github.com/users/keepassxreboot/gists{/gist_id}","starred_url":"https://api.github.com/users/keepassxreboot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keepassxreboot/subscriptions","organizations_url":"https://api.github.com/users/keepassxreboot/orgs","repos_url":"https://api.github.com/users/keepassxreboot/repos","events_url":"https://api.github.com/users/keepassxreboot/events{/privacy}","received_events_url":"https://api.github.com/users/keepassxreboot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keepassxreboot/keepassxc","description":"KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.","fork":false,"url":"https://api.github.com/repos/keepassxreboot/keepassxc","forks_url":"https://api.github.com/repos/keepassxreboot/keepassxc/forks","keys_url":"https://api.github.com/repos/keepassxreboot/keepassxc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keepassxreboot/keepassxc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keepassxreboot/keepassxc/teams","hooks_url":"https://api.github.com/repos/keepassxreboot/keepassxc/hooks","issue_events_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/events{/number}","events_url":"https://api.github.com/repos/keepassxreboot/keepassxc/events","assignees_url":"https://api.github.com/repos/keepassxreboot/keepassxc/assignees{/user}","branches_url":"https://api.github.com/repos/keepassxreboot/keepassxc/branches{/branch}","tags_url":"https://api.github.com/repos/keepassxreboot/keepassxc/tags","blobs_url":"https://api.github.com/repos/keepassxreboot/keepassxc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keepassxreboot/keepassxc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keepassxreboot/keepassxc/git/refs{/sha}","trees_url":"https://api.github.com/repos/keepassxreboot/keepassxc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keepassxreboot/keepassxc/statuses/{sha}","languages_url":"https://api.github.com/repos/keepassxreboot/keepassxc/languages","stargazers_url":"https://api.github.com/repos/keepassxreboot/keepassxc/stargazers","contributors_url":"https://api.github.com/repos/keepassxreboot/keepassxc/contributors","subscribers_url":"https://api.github.com/repos/keepassxreboot/keepassxc/subscribers","subscription_url":"https://api.github.com/repos/keepassxreboot/keepassxc/subscription","commits_url":"https://api.github.com/repos/keepassxreboot/keepassxc/commits{/sha}","git_commits_url":"https://api.github.com/repos/keepassxreboot/keepassxc/git/commits{/sha}","comments_url":"https://api.github.com/repos/keepassxreboot/keepassxc/comments{/number}","issue_comment_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/comments{/number}","contents_url":"https://api.github.com/repos/keepassxreboot/keepassxc/contents/{+path}","compare_url":"https://api.github.com/repos/keepassxreboot/keepassxc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keepassxreboot/keepassxc/merges","archive_url":"https://api.github.com/repos/keepassxreboot/keepassxc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keepassxreboot/keepassxc/downloads","issues_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues{/number}","pulls_url":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls{/number}","milestones_url":"https://api.github.com/repos/keepassxreboot/keepassxc/milestones{/number}","notifications_url":"https://api.github.com/repos/keepassxreboot/keepassxc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keepassxreboot/keepassxc/labels{/name}","releases_url":"https://api.github.com/repos/keepassxreboot/keepassxc/releases{/id}","deployments_url":"https://api.github.com/repos/keepassxreboot/keepassxc/deployments","created_at":"2016-02-28T15:52:40Z","updated_at":"2017-07-05T13:56:19Z","pushed_at":"2017-07-05T11:39:26Z","git_url":"git://github.com/keepassxreboot/keepassxc.git","ssh_url":"git@github.com:keepassxreboot/keepassxc.git","clone_url":"https://github.com/keepassxreboot/keepassxc.git","svn_url":"https://github.com/keepassxreboot/keepassxc","homepage":"https://keepassxc.org/","size":8598,"stargazers_count":1815,"watchers_count":1815,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":157,"forks":107,"open_issues":157,"watchers":1815,"default_branch":"develop"}},"base":{"label":"keepassxreboot:release/2.2.1","ref":"release/2.2.1","sha":"2d127b8942b92d26aa4373269705afb85e48b783","user":{"login":"keepassxreboot","id":22534815,"avatar_url":"https://avatars0.githubusercontent.com/u/22534815?v=3","gravatar_id":"","url":"https://api.github.com/users/keepassxreboot","html_url":"https://github.com/keepassxreboot","followers_url":"https://api.github.com/users/keepassxreboot/followers","following_url":"https://api.github.com/users/keepassxreboot/following{/other_user}","gists_url":"https://api.github.com/users/keepassxreboot/gists{/gist_id}","starred_url":"https://api.github.com/users/keepassxreboot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keepassxreboot/subscriptions","organizations_url":"https://api.github.com/users/keepassxreboot/orgs","repos_url":"https://api.github.com/users/keepassxreboot/repos","events_url":"https://api.github.com/users/keepassxreboot/events{/privacy}","received_events_url":"https://api.github.com/users/keepassxreboot/received_events","type":"Organization","site_admin":false},"repo":{"id":52729242,"name":"keepassxc","full_name":"keepassxreboot/keepassxc","owner":{"login":"keepassxreboot","id":22534815,"avatar_url":"https://avatars0.githubusercontent.com/u/22534815?v=3","gravatar_id":"","url":"https://api.github.com/users/keepassxreboot","html_url":"https://github.com/keepassxreboot","followers_url":"https://api.github.com/users/keepassxreboot/followers","following_url":"https://api.github.com/users/keepassxreboot/following{/other_user}","gists_url":"https://api.github.com/users/keepassxreboot/gists{/gist_id}","starred_url":"https://api.github.com/users/keepassxreboot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keepassxreboot/subscriptions","organizations_url":"https://api.github.com/users/keepassxreboot/orgs","repos_url":"https://api.github.com/users/keepassxreboot/repos","events_url":"https://api.github.com/users/keepassxreboot/events{/privacy}","received_events_url":"https://api.github.com/users/keepassxreboot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keepassxreboot/keepassxc","description":"KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.","fork":false,"url":"https://api.github.com/repos/keepassxreboot/keepassxc","forks_url":"https://api.github.com/repos/keepassxreboot/keepassxc/forks","keys_url":"https://api.github.com/repos/keepassxreboot/keepassxc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keepassxreboot/keepassxc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keepassxreboot/keepassxc/teams","hooks_url":"https://api.github.com/repos/keepassxreboot/keepassxc/hooks","issue_events_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/events{/number}","events_url":"https://api.github.com/repos/keepassxreboot/keepassxc/events","assignees_url":"https://api.github.com/repos/keepassxreboot/keepassxc/assignees{/user}","branches_url":"https://api.github.com/repos/keepassxreboot/keepassxc/branches{/branch}","tags_url":"https://api.github.com/repos/keepassxreboot/keepassxc/tags","blobs_url":"https://api.github.com/repos/keepassxreboot/keepassxc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keepassxreboot/keepassxc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keepassxreboot/keepassxc/git/refs{/sha}","trees_url":"https://api.github.com/repos/keepassxreboot/keepassxc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keepassxreboot/keepassxc/statuses/{sha}","languages_url":"https://api.github.com/repos/keepassxreboot/keepassxc/languages","stargazers_url":"https://api.github.com/repos/keepassxreboot/keepassxc/stargazers","contributors_url":"https://api.github.com/repos/keepassxreboot/keepassxc/contributors","subscribers_url":"https://api.github.com/repos/keepassxreboot/keepassxc/subscribers","subscription_url":"https://api.github.com/repos/keepassxreboot/keepassxc/subscription","commits_url":"https://api.github.com/repos/keepassxreboot/keepassxc/commits{/sha}","git_commits_url":"https://api.github.com/repos/keepassxreboot/keepassxc/git/commits{/sha}","comments_url":"https://api.github.com/repos/keepassxreboot/keepassxc/comments{/number}","issue_comment_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/comments{/number}","contents_url":"https://api.github.com/repos/keepassxreboot/keepassxc/contents/{+path}","compare_url":"https://api.github.com/repos/keepassxreboot/keepassxc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keepassxreboot/keepassxc/merges","archive_url":"https://api.github.com/repos/keepassxreboot/keepassxc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keepassxreboot/keepassxc/downloads","issues_url":"https://api.github.com/repos/keepassxreboot/keepassxc/issues{/number}","pulls_url":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls{/number}","milestones_url":"https://api.github.com/repos/keepassxreboot/keepassxc/milestones{/number}","notifications_url":"https://api.github.com/repos/keepassxreboot/keepassxc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keepassxreboot/keepassxc/labels{/name}","releases_url":"https://api.github.com/repos/keepassxreboot/keepassxc/releases{/id}","deployments_url":"https://api.github.com/repos/keepassxreboot/keepassxc/deployments","created_at":"2016-02-28T15:52:40Z","updated_at":"2017-07-05T13:56:19Z","pushed_at":"2017-07-05T11:39:26Z","git_url":"git://github.com/keepassxreboot/keepassxc.git","ssh_url":"git@github.com:keepassxreboot/keepassxc.git","clone_url":"https://github.com/keepassxreboot/keepassxc.git","svn_url":"https://github.com/keepassxreboot/keepassxc","homepage":"https://keepassxc.org/","size":8598,"stargazers_count":1815,"watchers_count":1815,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":157,"forks":107,"open_issues":157,"watchers":1815,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/719"},"html":{"href":"https://github.com/keepassxreboot/keepassxc/pull/719"},"issue":{"href":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/719"},"comments":{"href":"https://api.github.com/repos/keepassxreboot/keepassxc/issues/719/comments"},"review_comments":{"href":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/719/comments"},"review_comment":{"href":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keepassxreboot/keepassxc/pulls/719/commits"},"statuses":{"href":"https://api.github.com/repos/keepassxreboot/keepassxc/statuses/16692ec8367310fb1b3dcc3be9c960da6bad257b"}}}}
{"actor":{"display_login":"louib"}}