GitHub PullRequestReviewCommentEvent at 2014-01-13 13:23:56
Repository: jmbo-foundry
Actor: hedleyroos
Payload: {"comment":{"url":"https://api.github.com/repos/praekelt/jmbo-foundry/pulls/comments/8824411","id":8824411,"diff_hunk":"@@ -101,9 +107,69 @@ def process_response(self, request, response):\n             if private_site:\n                 return HttpResponseRedirect(reverse('login'))\n             else:\n+                # check if a partner site has supplied this\n+                # site with the user's age\n+                ag_values, expires = self.get_partner_age_gateway_values(request)\n+                if ag_values and expires:\n+                    # verify age and automatically pass age gateway\n+                    dob = datetime.strptime(ag_values[3:], '%d-%m-%Y').date()\n+                    if Country.objects.filter(country_code__iexact=ag_values[:2],","path":"foundry/middleware.py","position":38,"original_position":38,"commit_id":"04a2de2fa76c68066b2692868365b3e6a9b04ad9","original_commit_id":"04a2de2fa76c68066b2692868365b3e6a9b04ad9","user":{"login":"hedleyroos","id":316314,"avatar_url":"https://gravatar.com/avatar/672c878b962c7074c1b1fc83d6aea22f?d=https%3A%2F%2Fidenticons.github.com%2F27a8164b324a48df5a5da787354b102e.png&r=x","gravatar_id":"672c878b962c7074c1b1fc83d6aea22f","url":"https://api.github.com/users/hedleyroos","html_url":"https://github.com/hedleyroos","followers_url":"https://api.github.com/users/hedleyroos/followers","following_url":"https://api.github.com/users/hedleyroos/following{/other_user}","gists_url":"https://api.github.com/users/hedleyroos/gists{/gist_id}","starred_url":"https://api.github.com/users/hedleyroos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hedleyroos/subscriptions","organizations_url":"https://api.github.com/users/hedleyroos/orgs","repos_url":"https://api.github.com/users/hedleyroos/repos","events_url":"https://api.github.com/users/hedleyroos/events{/privacy}","received_events_url":"https://api.github.com/users/hedleyroos/received_events","type":"User","site_admin":false},"body":"DOS vulnerability since this query is in middleware. It should be possible to rewrite using a cached data structure. It is arguably not a real threat now so if time is a factor then just leave a comment.","created_at":"2014-01-13T13:23:56Z","updated_at":"2014-01-13T13:23:56Z","html_url":"https://github.com/praekelt/jmbo-foundry/pull/61#discussion_r8824411","pull_request_url":"https://api.github.com/repos/praekelt/jmbo-foundry/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/praekelt/jmbo-foundry/pulls/comments/8824411"},"html":{"href":"https://github.com/praekelt/jmbo-foundry/pull/61#discussion_r8824411"},"pull_request":{"href":"https://api.github.com/repos/praekelt/jmbo-foundry/pulls/61"}}}}