{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/socorro/pulls/comments/42782868","id":42782868,"diff_hunk":"@@ -35,36 +37,36 @@\n )\n \n \n-def get_validated_params(request):\n-    params = get_params(request)\n-    if isinstance(params, http.HttpResponseBadRequest):\n-        # There was an error in the form, let's return it.\n-        return params\n+def get_validated_params(view):\n+    @functools.wraps(view)\n+    def inner(request, *args, **kwargs):\n+        try:\n+            params = get_params(request)\n \n-    if len(params['signature']) > 1:\n-        return http.HttpResponseBadRequest(\n-            'Invalid value for \"signature\" parameter, '\n-            'only one value is accepted'\n-        )\n+            if len(params['signature']) > 1:\n+                raise ValidationError(\n+                    'Invalid value for \"signature\" parameter, '\n+                    'only one value is accepted'\n+                )\n \n-    if not params['signature'] or not params['signature'][0]:\n-        return http.HttpResponseBadRequest(\n-            '\"signature\" parameter is mandatory'\n-        )\n+            if not params['signature'] or not params['signature'][0]:\n+                raise ValidationError(\n+                    '\"signature\" parameter is mandatory'\n+                )\n+        except ValidationError, e:\n+            return http.HttpResponseBadRequest(str(e))\n \n-    return params\n+        kwargs['params'] = params\n+        return view(request, *args, **kwargs)\n+    return inner\n \n \n @waffle_switch('signature-report')\n+@get_validated_params\n @pass_default_context","path":"webapp-django/crashstats/signature/views.py","position":64,"original_position":64,"commit_id":"28d7359dafd71520e934b174a0ccffc00f6dd1df","original_commit_id":"28d7359dafd71520e934b174a0ccffc00f6dd1df","user":{"login":"peterbe","id":26739,"avatar_url":"https://avatars.githubusercontent.com/u/26739?v=3","gravatar_id":"","url":"https://api.github.com/users/peterbe","html_url":"https://github.com/peterbe","followers_url":"https://api.github.com/users/peterbe/followers","following_url":"https://api.github.com/users/peterbe/following{/other_user}","gists_url":"https://api.github.com/users/peterbe/gists{/gist_id}","starred_url":"https://api.github.com/users/peterbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterbe/subscriptions","organizations_url":"https://api.github.com/users/peterbe/orgs","repos_url":"https://api.github.com/users/peterbe/repos","events_url":"https://api.github.com/users/peterbe/events{/privacy}","received_events_url":"https://api.github.com/users/peterbe/received_events","type":"User","site_admin":false},"body":"I wonder if this is needed? Isn't that just there so that you can get access to the current products and versions. Try removing it (and the `default_context=None`) and see if it all continues to work. ","created_at":"2015-10-22T18:01:31Z","updated_at":"2015-10-22T18:01:31Z","html_url":"https://github.com/mozilla/socorro/pull/3038#discussion_r42782868","pull_request_url":"https://api.github.com/repos/mozilla/socorro/pulls/3038","_links":{"self":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/comments/42782868"},"html":{"href":"https://github.com/mozilla/socorro/pull/3038#discussion_r42782868"},"pull_request":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/3038"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/socorro/pulls/3038","id":47790627,"html_url":"https://github.com/mozilla/socorro/pull/3038","diff_url":"https://github.com/mozilla/socorro/pull/3038.diff","patch_url":"https://github.com/mozilla/socorro/pull/3038.patch","issue_url":"https://api.github.com/repos/mozilla/socorro/issues/3038","number":3038,"state":"open","locked":false,"title":"Fixes bug 1214558 - Added a first prototype of a Summary tab.","user":{"login":"AdrianGaudebert","id":328790,"avatar_url":"https://avatars.githubusercontent.com/u/328790?v=3","gravatar_id":"","url":"https://api.github.com/users/AdrianGaudebert","html_url":"https://github.com/AdrianGaudebert","followers_url":"https://api.github.com/users/AdrianGaudebert/followers","following_url":"https://api.github.com/users/AdrianGaudebert/following{/other_user}","gists_url":"https://api.github.com/users/AdrianGaudebert/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianGaudebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianGaudebert/subscriptions","organizations_url":"https://api.github.com/users/AdrianGaudebert/orgs","repos_url":"https://api.github.com/users/AdrianGaudebert/repos","events_url":"https://api.github.com/users/AdrianGaudebert/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianGaudebert/received_events","type":"User","site_admin":false},"body":"@peterbe r?\r\n\r\nThis is the first step, I'm adding no new features to Super Search, no new data, just using existing features. I could reproduce 4 features perfectly (architecture, process type, flash version and exploitability), and an imperfect operating system summary (it's missing more precise OS names). \r\n\r\nI'm now going to work on adding what's needed to make the remaining 5 features. ","created_at":"2015-10-15T14:06:38Z","updated_at":"2015-10-22T18:01:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6382a165d71133c2349bd79e4f93a3c71f19394a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/socorro/pulls/3038/commits","review_comments_url":"https://api.github.com/repos/mozilla/socorro/pulls/3038/comments","review_comment_url":"https://api.github.com/repos/mozilla/socorro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/socorro/issues/3038/comments","statuses_url":"https://api.github.com/repos/mozilla/socorro/statuses/28d7359dafd71520e934b174a0ccffc00f6dd1df","head":{"label":"AdrianGaudebert:1214558-summary-tab-prototype","ref":"1214558-summary-tab-prototype","sha":"28d7359dafd71520e934b174a0ccffc00f6dd1df","user":{"login":"AdrianGaudebert","id":328790,"avatar_url":"https://avatars.githubusercontent.com/u/328790?v=3","gravatar_id":"","url":"https://api.github.com/users/AdrianGaudebert","html_url":"https://github.com/AdrianGaudebert","followers_url":"https://api.github.com/users/AdrianGaudebert/followers","following_url":"https://api.github.com/users/AdrianGaudebert/following{/other_user}","gists_url":"https://api.github.com/users/AdrianGaudebert/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianGaudebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianGaudebert/subscriptions","organizations_url":"https://api.github.com/users/AdrianGaudebert/orgs","repos_url":"https://api.github.com/users/AdrianGaudebert/repos","events_url":"https://api.github.com/users/AdrianGaudebert/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianGaudebert/received_events","type":"User","site_admin":false},"repo":{"id":2353068,"name":"socorro","full_name":"AdrianGaudebert/socorro","owner":{"login":"AdrianGaudebert","id":328790,"avatar_url":"https://avatars.githubusercontent.com/u/328790?v=3","gravatar_id":"","url":"https://api.github.com/users/AdrianGaudebert","html_url":"https://github.com/AdrianGaudebert","followers_url":"https://api.github.com/users/AdrianGaudebert/followers","following_url":"https://api.github.com/users/AdrianGaudebert/following{/other_user}","gists_url":"https://api.github.com/users/AdrianGaudebert/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianGaudebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianGaudebert/subscriptions","organizations_url":"https://api.github.com/users/AdrianGaudebert/orgs","repos_url":"https://api.github.com/users/AdrianGaudebert/repos","events_url":"https://api.github.com/users/AdrianGaudebert/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianGaudebert/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AdrianGaudebert/socorro","description":"Socorro is a server to accept and process Breakpad crash reports. ","fork":true,"url":"https://api.github.com/repos/AdrianGaudebert/socorro","forks_url":"https://api.github.com/repos/AdrianGaudebert/socorro/forks","keys_url":"https://api.github.com/repos/AdrianGaudebert/socorro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdrianGaudebert/socorro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdrianGaudebert/socorro/teams","hooks_url":"https://api.github.com/repos/AdrianGaudebert/socorro/hooks","issue_events_url":"https://api.github.com/repos/AdrianGaudebert/socorro/issues/events{/number}","events_url":"https://api.github.com/repos/AdrianGaudebert/socorro/events","assignees_url":"https://api.github.com/repos/AdrianGaudebert/socorro/assignees{/user}","branches_url":"https://api.github.com/repos/AdrianGaudebert/socorro/branches{/branch}","tags_url":"https://api.github.com/repos/AdrianGaudebert/socorro/tags","blobs_url":"https://api.github.com/repos/AdrianGaudebert/socorro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdrianGaudebert/socorro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdrianGaudebert/socorro/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdrianGaudebert/socorro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdrianGaudebert/socorro/statuses/{sha}","languages_url":"https://api.github.com/repos/AdrianGaudebert/socorro/languages","stargazers_url":"https://api.github.com/repos/AdrianGaudebert/socorro/stargazers","contributors_url":"https://api.github.com/repos/AdrianGaudebert/socorro/contributors","subscribers_url":"https://api.github.com/repos/AdrianGaudebert/socorro/subscribers","subscription_url":"https://api.github.com/repos/AdrianGaudebert/socorro/subscription","commits_url":"https://api.github.com/repos/AdrianGaudebert/socorro/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdrianGaudebert/socorro/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdrianGaudebert/socorro/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdrianGaudebert/socorro/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdrianGaudebert/socorro/contents/{+path}","compare_url":"https://api.github.com/repos/AdrianGaudebert/socorro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdrianGaudebert/socorro/merges","archive_url":"https://api.github.com/repos/AdrianGaudebert/socorro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdrianGaudebert/socorro/downloads","issues_url":"https://api.github.com/repos/AdrianGaudebert/socorro/issues{/number}","pulls_url":"https://api.github.com/repos/AdrianGaudebert/socorro/pulls{/number}","milestones_url":"https://api.github.com/repos/AdrianGaudebert/socorro/milestones{/number}","notifications_url":"https://api.github.com/repos/AdrianGaudebert/socorro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdrianGaudebert/socorro/labels{/name}","releases_url":"https://api.github.com/repos/AdrianGaudebert/socorro/releases{/id}","created_at":"2011-09-09T02:59:03Z","updated_at":"2015-08-07T14:15:18Z","pushed_at":"2015-10-22T16:08:46Z","git_url":"git://github.com/AdrianGaudebert/socorro.git","ssh_url":"git@github.com:AdrianGaudebert/socorro.git","clone_url":"https://github.com/AdrianGaudebert/socorro.git","svn_url":"https://github.com/AdrianGaudebert/socorro","homepage":"https://wiki.mozilla.org/Socorro","size":164049,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"mozilla:master","ref":"master","sha":"3732d17fdadf9c543c9f62d72d2d0fd5acf65b19","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":2263742,"name":"socorro","full_name":"mozilla/socorro","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/socorro","description":"Socorro is a server to accept and process Breakpad crash reports. ","fork":false,"url":"https://api.github.com/repos/mozilla/socorro","forks_url":"https://api.github.com/repos/mozilla/socorro/forks","keys_url":"https://api.github.com/repos/mozilla/socorro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/socorro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/socorro/teams","hooks_url":"https://api.github.com/repos/mozilla/socorro/hooks","issue_events_url":"https://api.github.com/repos/mozilla/socorro/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/socorro/events","assignees_url":"https://api.github.com/repos/mozilla/socorro/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/socorro/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/socorro/tags","blobs_url":"https://api.github.com/repos/mozilla/socorro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/socorro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/socorro/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/socorro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/socorro/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/socorro/languages","stargazers_url":"https://api.github.com/repos/mozilla/socorro/stargazers","contributors_url":"https://api.github.com/repos/mozilla/socorro/contributors","subscribers_url":"https://api.github.com/repos/mozilla/socorro/subscribers","subscription_url":"https://api.github.com/repos/mozilla/socorro/subscription","commits_url":"https://api.github.com/repos/mozilla/socorro/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/socorro/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/socorro/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/socorro/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/socorro/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/socorro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/socorro/merges","archive_url":"https://api.github.com/repos/mozilla/socorro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/socorro/downloads","issues_url":"https://api.github.com/repos/mozilla/socorro/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/socorro/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/socorro/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/socorro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/socorro/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/socorro/releases{/id}","created_at":"2011-08-24T19:21:49Z","updated_at":"2015-10-13T05:53:08Z","pushed_at":"2015-10-22T16:08:08Z","git_url":"git://github.com/mozilla/socorro.git","ssh_url":"git@github.com:mozilla/socorro.git","clone_url":"https://github.com/mozilla/socorro.git","svn_url":"https://github.com/mozilla/socorro","homepage":"https://wiki.mozilla.org/Socorro","size":193260,"stargazers_count":246,"watchers_count":246,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":131,"mirror_url":null,"open_issues_count":7,"forks":131,"open_issues":7,"watchers":246,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/3038"},"html":{"href":"https://github.com/mozilla/socorro/pull/3038"},"issue":{"href":"https://api.github.com/repos/mozilla/socorro/issues/3038"},"comments":{"href":"https://api.github.com/repos/mozilla/socorro/issues/3038/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/3038/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/3038/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/socorro/statuses/28d7359dafd71520e934b174a0ccffc00f6dd1df"}}}}