GitHub PullRequestReviewCommentEvent at 2014-09-25 08:00:10
Repository: django-invitation-simplified
Actor: mateusz-sikora
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/comments/18018948","id":18018948,"diff_hunk":"@@ -27,8 +27,8 @@ def create_invitation(self, user, email):\n         kwargs['date_invited'] = date_invited\n         #kwargs['groups':groups]\n         kwargs['expiration_date'] = date_invited + datetime.timedelta(settings.ACCOUNT_INVITATION_DAYS)\n-        salt = sha_constructor(str(random.random())).hexdigest()[:5]\n-        kwargs['code'] = sha_constructor(\"%s%s%s\" % (datetime.datetime.now(), salt, user.username)).hexdigest()\n+        salt = hashlib.sha1(str(random.random())).hexdigest()[:5]\n+        kwargs['code'] = hashlib.sha1(\"%s%s%s\" % (datetime.datetime.now(), salt, user.username)).hexdigest()","path":"invitation/models.py","position":null,"original_position":31,"commit_id":"b428dca56030a2ddc2b56afcf22d209915088d4d","original_commit_id":"fa8315c2d66786cd3a8a2920561f99f4188b3326","user":{"login":"mateusz-sikora","id":1392361,"avatar_url":"https://avatars.githubusercontent.com/u/1392361?v=2","gravatar_id":"","url":"https://api.github.com/users/mateusz-sikora","html_url":"https://github.com/mateusz-sikora","followers_url":"https://api.github.com/users/mateusz-sikora/followers","following_url":"https://api.github.com/users/mateusz-sikora/following{/other_user}","gists_url":"https://api.github.com/users/mateusz-sikora/gists{/gist_id}","starred_url":"https://api.github.com/users/mateusz-sikora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateusz-sikora/subscriptions","organizations_url":"https://api.github.com/users/mateusz-sikora/orgs","repos_url":"https://api.github.com/users/mateusz-sikora/repos","events_url":"https://api.github.com/users/mateusz-sikora/events{/privacy}","received_events_url":"https://api.github.com/users/mateusz-sikora/received_events","type":"User","site_admin":false},"body":"@mvanveen this solution has a bug - default_token_generation doesn't deliver unique hash, so user can't generate more than one invitation\r\n\r\n```In [25]: default_token_generator.make_token(user)\r\nOut[25]: u'3vb-2dbbf7a23215be0ade7e'\r\n\r\nIn [26]: default_token_generator.make_token(user)\r\nOut[26]: u'3vb-2dbbf7a23215be0ade7e'\r\n\r\nIn [27]: default_token_generator.make_token(user)\r\nOut[27]: u'3vb-2dbbf7a23215be0ade7e'\r\n```\r\n\r\nWe need to get back to hashlib.sha1 unless you have other solution","created_at":"2014-09-25T08:00:10Z","updated_at":"2014-09-25T08:00:10Z","html_url":"https://github.com/joeatmatterport/django-invitation-simplified/pull/3#discussion_r18018948","pull_request_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/comments/18018948"},"html":{"href":"https://github.com/joeatmatterport/django-invitation-simplified/pull/3#discussion_r18018948"},"pull_request":{"href":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/3","id":20035435,"html_url":"https://github.com/joeatmatterport/django-invitation-simplified/pull/3","diff_url":"https://github.com/joeatmatterport/django-invitation-simplified/pull/3.diff","patch_url":"https://github.com/joeatmatterport/django-invitation-simplified/pull/3.patch","issue_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/issues/3","number":3,"state":"open","locked":false,"title":"replace django.utils.hashcompat with hashlib","user":{"login":"mateusz-sikora","id":1392361,"avatar_url":"https://avatars.githubusercontent.com/u/1392361?v=2","gravatar_id":"","url":"https://api.github.com/users/mateusz-sikora","html_url":"https://github.com/mateusz-sikora","followers_url":"https://api.github.com/users/mateusz-sikora/followers","following_url":"https://api.github.com/users/mateusz-sikora/following{/other_user}","gists_url":"https://api.github.com/users/mateusz-sikora/gists{/gist_id}","starred_url":"https://api.github.com/users/mateusz-sikora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateusz-sikora/subscriptions","organizations_url":"https://api.github.com/users/mateusz-sikora/orgs","repos_url":"https://api.github.com/users/mateusz-sikora/repos","events_url":"https://api.github.com/users/mateusz-sikora/events{/privacy}","received_events_url":"https://api.github.com/users/mateusz-sikora/received_events","type":"User","site_admin":false},"body":"The compatibility modules django.utils.copycompat and django.utils.hashcompat as well as the functions django.utils.itercompat.all and django.utils.itercompat.any will be removed. The Python builtin versions should be used instead.\r\n\r\nhttps://docs.djangoproject.com/en/1.4/internals/deprecation/#id3","created_at":"2014-08-20T09:59:50Z","updated_at":"2014-09-25T08:00:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fb12ff582c0666c723a76e3fb46899e97b34b8d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/3/commits","review_comments_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/3/comments","review_comment_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/comments/{number}","comments_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/issues/3/comments","statuses_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/statuses/b428dca56030a2ddc2b56afcf22d209915088d4d","head":{"label":"Tivix:develop","ref":"develop","sha":"b428dca56030a2ddc2b56afcf22d209915088d4d","user":{"login":"Tivix","id":610135,"avatar_url":"https://avatars.githubusercontent.com/u/610135?v=2","gravatar_id":"","url":"https://api.github.com/users/Tivix","html_url":"https://github.com/Tivix","followers_url":"https://api.github.com/users/Tivix/followers","following_url":"https://api.github.com/users/Tivix/following{/other_user}","gists_url":"https://api.github.com/users/Tivix/gists{/gist_id}","starred_url":"https://api.github.com/users/Tivix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tivix/subscriptions","organizations_url":"https://api.github.com/users/Tivix/orgs","repos_url":"https://api.github.com/users/Tivix/repos","events_url":"https://api.github.com/users/Tivix/events{/privacy}","received_events_url":"https://api.github.com/users/Tivix/received_events","type":"Organization","site_admin":false},"repo":{"id":22840308,"name":"django-invitation-simplified","full_name":"Tivix/django-invitation-simplified","owner":{"login":"Tivix","id":610135,"avatar_url":"https://avatars.githubusercontent.com/u/610135?v=2","gravatar_id":"","url":"https://api.github.com/users/Tivix","html_url":"https://github.com/Tivix","followers_url":"https://api.github.com/users/Tivix/followers","following_url":"https://api.github.com/users/Tivix/following{/other_user}","gists_url":"https://api.github.com/users/Tivix/gists{/gist_id}","starred_url":"https://api.github.com/users/Tivix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tivix/subscriptions","organizations_url":"https://api.github.com/users/Tivix/orgs","repos_url":"https://api.github.com/users/Tivix/repos","events_url":"https://api.github.com/users/Tivix/events{/privacy}","received_events_url":"https://api.github.com/users/Tivix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Tivix/django-invitation-simplified","description":"https://bitbucket.org/jsma/django-invitation","fork":true,"url":"https://api.github.com/repos/Tivix/django-invitation-simplified","forks_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/forks","keys_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/teams","hooks_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/hooks","issue_events_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/issues/events{/number}","events_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/events","assignees_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/assignees{/user}","branches_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/branches{/branch}","tags_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/tags","blobs_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/statuses/{sha}","languages_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/languages","stargazers_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/stargazers","contributors_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/contributors","subscribers_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/subscribers","subscription_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/subscription","commits_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/issues/comments/{number}","contents_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/contents/{+path}","compare_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/merges","archive_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/downloads","issues_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/issues{/number}","pulls_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/pulls{/number}","milestones_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/milestones{/number}","notifications_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/labels{/name}","releases_url":"https://api.github.com/repos/Tivix/django-invitation-simplified/releases{/id}","created_at":"2014-08-11T13:39:55Z","updated_at":"2014-08-11T13:43:43Z","pushed_at":"2014-09-23T14:06:03Z","git_url":"git://github.com/Tivix/django-invitation-simplified.git","ssh_url":"git@github.com:Tivix/django-invitation-simplified.git","clone_url":"https://github.com/Tivix/django-invitation-simplified.git","svn_url":"https://github.com/Tivix/django-invitation-simplified","homepage":null,"size":172,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"joeatmatterport:master","ref":"master","sha":"000fde36f4f93c76a76625755460a129ec1d8c36","user":{"login":"joeatmatterport","id":2907751,"avatar_url":"https://avatars.githubusercontent.com/u/2907751?v=2","gravatar_id":"","url":"https://api.github.com/users/joeatmatterport","html_url":"https://github.com/joeatmatterport","followers_url":"https://api.github.com/users/joeatmatterport/followers","following_url":"https://api.github.com/users/joeatmatterport/following{/other_user}","gists_url":"https://api.github.com/users/joeatmatterport/gists{/gist_id}","starred_url":"https://api.github.com/users/joeatmatterport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeatmatterport/subscriptions","organizations_url":"https://api.github.com/users/joeatmatterport/orgs","repos_url":"https://api.github.com/users/joeatmatterport/repos","events_url":"https://api.github.com/users/joeatmatterport/events{/privacy}","received_events_url":"https://api.github.com/users/joeatmatterport/received_events","type":"User","site_admin":false},"repo":{"id":11824982,"name":"django-invitation-simplified","full_name":"joeatmatterport/django-invitation-simplified","owner":{"login":"joeatmatterport","id":2907751,"avatar_url":"https://avatars.githubusercontent.com/u/2907751?v=2","gravatar_id":"","url":"https://api.github.com/users/joeatmatterport","html_url":"https://github.com/joeatmatterport","followers_url":"https://api.github.com/users/joeatmatterport/followers","following_url":"https://api.github.com/users/joeatmatterport/following{/other_user}","gists_url":"https://api.github.com/users/joeatmatterport/gists{/gist_id}","starred_url":"https://api.github.com/users/joeatmatterport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeatmatterport/subscriptions","organizations_url":"https://api.github.com/users/joeatmatterport/orgs","repos_url":"https://api.github.com/users/joeatmatterport/repos","events_url":"https://api.github.com/users/joeatmatterport/events{/privacy}","received_events_url":"https://api.github.com/users/joeatmatterport/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joeatmatterport/django-invitation-simplified","description":"https://bitbucket.org/jsma/django-invitation","fork":false,"url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified","forks_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/forks","keys_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/teams","hooks_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/hooks","issue_events_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/issues/events{/number}","events_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/events","assignees_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/assignees{/user}","branches_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/branches{/branch}","tags_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/tags","blobs_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/git/refs{/sha}","trees_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/statuses/{sha}","languages_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/languages","stargazers_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/stargazers","contributors_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/contributors","subscribers_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/subscribers","subscription_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/subscription","commits_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/commits{/sha}","git_commits_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/git/commits{/sha}","comments_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/comments{/number}","issue_comment_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/issues/comments/{number}","contents_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/contents/{+path}","compare_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/merges","archive_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/downloads","issues_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/issues{/number}","pulls_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls{/number}","milestones_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/milestones{/number}","notifications_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/labels{/name}","releases_url":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/releases{/id}","created_at":"2013-08-01T18:53:03Z","updated_at":"2014-03-20T01:06:46Z","pushed_at":"2014-03-20T01:06:45Z","git_url":"git://github.com/joeatmatterport/django-invitation-simplified.git","ssh_url":"git@github.com:joeatmatterport/django-invitation-simplified.git","clone_url":"https://github.com/joeatmatterport/django-invitation-simplified.git","svn_url":"https://github.com/joeatmatterport/django-invitation-simplified","homepage":null,"size":162,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/3"},"html":{"href":"https://github.com/joeatmatterport/django-invitation-simplified/pull/3"},"issue":{"href":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/issues/3"},"comments":{"href":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/joeatmatterport/django-invitation-simplified/statuses/b428dca56030a2ddc2b56afcf22d209915088d4d"}}}}