{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/199028900","pull_request_review_id":133069994,"id":199028900,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTAyODkwMA==","diff_hunk":"@@ -298,6 +298,9 @@ def is_safe_url(url, allowed_hosts, require_https=False):\n         return False\n     if allowed_hosts is None:\n         allowed_hosts = set()\n+    elif isinstance(allowed_hosts, str):\n+        # allowed_hosts passed in as a str by mistake.","path":"django/utils/http.py","position":5,"original_position":5,"commit_id":"418af199f18dc1f4fecb525d7b67081a9654f47b","original_commit_id":"418af199f18dc1f4fecb525d7b67081a9654f47b","user":{"login":"jdufresne","id":347634,"node_id":"MDQ6VXNlcjM0NzYzNA==","avatar_url":"https://avatars1.githubusercontent.com/u/347634?v=4","gravatar_id":"","url":"https://api.github.com/users/jdufresne","html_url":"https://github.com/jdufresne","followers_url":"https://api.github.com/users/jdufresne/followers","following_url":"https://api.github.com/users/jdufresne/following{/other_user}","gists_url":"https://api.github.com/users/jdufresne/gists{/gist_id}","starred_url":"https://api.github.com/users/jdufresne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdufresne/subscriptions","organizations_url":"https://api.github.com/users/jdufresne/orgs","repos_url":"https://api.github.com/users/jdufresne/repos","events_url":"https://api.github.com/users/jdufresne/events{/privacy}","received_events_url":"https://api.github.com/users/jdufresne/received_events","type":"User","site_admin":false},"body":"I guess if it is a supported interface, it isn't fair to call it a mistake. ","created_at":"2018-06-29T00:58:20Z","updated_at":"2018-06-29T00:59:04Z","html_url":"https://github.com/django/django/pull/10082#discussion_r199028900","pull_request_url":"https://api.github.com/repos/django/django/pulls/10082","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/199028900"},"html":{"href":"https://github.com/django/django/pull/10082#discussion_r199028900"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/10082"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/10082","id":196686473,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2Njg2NDcz","html_url":"https://github.com/django/django/pull/10082","diff_url":"https://github.com/django/django/pull/10082.diff","patch_url":"https://github.com/django/django/pull/10082.patch","issue_url":"https://api.github.com/repos/django/django/issues/10082","number":10082,"state":"open","locked":false,"title":"Fixed #29525 -- Handle strings as allowed_hosts arguments to is_safe_url()","user":{"login":"suligap","id":1270737,"node_id":"MDQ6VXNlcjEyNzA3Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1270737?v=4","gravatar_id":"","url":"https://api.github.com/users/suligap","html_url":"https://github.com/suligap","followers_url":"https://api.github.com/users/suligap/followers","following_url":"https://api.github.com/users/suligap/following{/other_user}","gists_url":"https://api.github.com/users/suligap/gists{/gist_id}","starred_url":"https://api.github.com/users/suligap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suligap/subscriptions","organizations_url":"https://api.github.com/users/suligap/orgs","repos_url":"https://api.github.com/users/suligap/repos","events_url":"https://api.github.com/users/suligap/events{/privacy}","received_events_url":"https://api.github.com/users/suligap/received_events","type":"User","site_admin":false},"body":"https://code.djangoproject.com/ticket/29525\r\n\r\nWhen `allowed_hosts` is passed in incorrectly as a string instead of as a sequence of strings like this\r\n\r\n    >>> is_safe_url('http://good.co/evil', allowed_hosts='good.com')\r\n    True\r\n\r\n`is_safe_url()` will return `True` for some cases which might be exploited.\r\n\r\nThis is an attempt to fix this.","created_at":"2018-06-22T09:36:13Z","updated_at":"2018-06-29T00:59:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f8f92daf0d535a724c5ffdcb337fa131eb79732","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/10082/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/10082/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/10082/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/418af199f18dc1f4fecb525d7b67081a9654f47b","head":{"label":"suligap:allowed_hosts_string_fix","ref":"allowed_hosts_string_fix","sha":"418af199f18dc1f4fecb525d7b67081a9654f47b","user":{"login":"suligap","id":1270737,"node_id":"MDQ6VXNlcjEyNzA3Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1270737?v=4","gravatar_id":"","url":"https://api.github.com/users/suligap","html_url":"https://github.com/suligap","followers_url":"https://api.github.com/users/suligap/followers","following_url":"https://api.github.com/users/suligap/following{/other_user}","gists_url":"https://api.github.com/users/suligap/gists{/gist_id}","starred_url":"https://api.github.com/users/suligap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suligap/subscriptions","organizations_url":"https://api.github.com/users/suligap/orgs","repos_url":"https://api.github.com/users/suligap/repos","events_url":"https://api.github.com/users/suligap/events{/privacy}","received_events_url":"https://api.github.com/users/suligap/received_events","type":"User","site_admin":false},"repo":{"id":36561111,"node_id":"MDEwOlJlcG9zaXRvcnkzNjU2MTExMQ==","name":"django","full_name":"suligap/django","owner":{"login":"suligap","id":1270737,"node_id":"MDQ6VXNlcjEyNzA3Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1270737?v=4","gravatar_id":"","url":"https://api.github.com/users/suligap","html_url":"https://github.com/suligap","followers_url":"https://api.github.com/users/suligap/followers","following_url":"https://api.github.com/users/suligap/following{/other_user}","gists_url":"https://api.github.com/users/suligap/gists{/gist_id}","starred_url":"https://api.github.com/users/suligap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suligap/subscriptions","organizations_url":"https://api.github.com/users/suligap/orgs","repos_url":"https://api.github.com/users/suligap/repos","events_url":"https://api.github.com/users/suligap/events{/privacy}","received_events_url":"https://api.github.com/users/suligap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/suligap/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/suligap/django","forks_url":"https://api.github.com/repos/suligap/django/forks","keys_url":"https://api.github.com/repos/suligap/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/suligap/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/suligap/django/teams","hooks_url":"https://api.github.com/repos/suligap/django/hooks","issue_events_url":"https://api.github.com/repos/suligap/django/issues/events{/number}","events_url":"https://api.github.com/repos/suligap/django/events","assignees_url":"https://api.github.com/repos/suligap/django/assignees{/user}","branches_url":"https://api.github.com/repos/suligap/django/branches{/branch}","tags_url":"https://api.github.com/repos/suligap/django/tags","blobs_url":"https://api.github.com/repos/suligap/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/suligap/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/suligap/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/suligap/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/suligap/django/statuses/{sha}","languages_url":"https://api.github.com/repos/suligap/django/languages","stargazers_url":"https://api.github.com/repos/suligap/django/stargazers","contributors_url":"https://api.github.com/repos/suligap/django/contributors","subscribers_url":"https://api.github.com/repos/suligap/django/subscribers","subscription_url":"https://api.github.com/repos/suligap/django/subscription","commits_url":"https://api.github.com/repos/suligap/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/suligap/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/suligap/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/suligap/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/suligap/django/contents/{+path}","compare_url":"https://api.github.com/repos/suligap/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/suligap/django/merges","archive_url":"https://api.github.com/repos/suligap/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/suligap/django/downloads","issues_url":"https://api.github.com/repos/suligap/django/issues{/number}","pulls_url":"https://api.github.com/repos/suligap/django/pulls{/number}","milestones_url":"https://api.github.com/repos/suligap/django/milestones{/number}","notifications_url":"https://api.github.com/repos/suligap/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/suligap/django/labels{/name}","releases_url":"https://api.github.com/repos/suligap/django/releases{/id}","deployments_url":"https://api.github.com/repos/suligap/django/deployments","created_at":"2015-05-30T14:21:43Z","updated_at":"2015-05-30T14:21:57Z","pushed_at":"2018-06-25T20:05:53Z","git_url":"git://github.com/suligap/django.git","ssh_url":"git@github.com:suligap/django.git","clone_url":"https://github.com/suligap/django.git","svn_url":"https://github.com/suligap/django","homepage":"https://www.djangoproject.com/","size":169698,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"b9cf764be62e77b4777b3a75ec256f6209a57671","user":{"login":"django","id":27804,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3ODA0","avatar_url":"https://avatars2.githubusercontent.com/u/27804?v=4","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"node_id":"MDEwOlJlcG9zaXRvcnk0MTY0NDgy","name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3ODA0","avatar_url":"https://avatars2.githubusercontent.com/u/27804?v=4","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","deployments_url":"https://api.github.com/repos/django/django/deployments","created_at":"2012-04-28T02:47:18Z","updated_at":"2018-06-29T00:53:09Z","pushed_at":"2018-06-29T00:54:29Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":177917,"stargazers_count":34774,"watchers_count":34774,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14778,"mirror_url":null,"archived":false,"open_issues_count":174,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":14778,"open_issues":174,"watchers":34774,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/10082"},"html":{"href":"https://github.com/django/django/pull/10082"},"issue":{"href":"https://api.github.com/repos/django/django/issues/10082"},"comments":{"href":"https://api.github.com/repos/django/django/issues/10082/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/10082/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/10082/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/418af199f18dc1f4fecb525d7b67081a9654f47b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jdufresne"}}