{"action":"created","comment":{"url":"https://api.github.com/repos/SonarSource/sonarqube/pulls/comments/40722366","id":40722366,"diff_hunk":"@@ -19,34 +19,44 @@\n  */\n package org.sonar.server.platform;\n \n+import com.google.common.collect.ImmutableSet;\n+import java.io.IOException;\n+import java.util.Set;\n import javax.servlet.Filter;\n import javax.servlet.FilterChain;\n import javax.servlet.FilterConfig;\n import javax.servlet.ServletException;\n import javax.servlet.ServletRequest;\n import javax.servlet.ServletResponse;\n+import javax.servlet.http.HttpServletRequest;\n import javax.servlet.http.HttpServletResponse;\n \n-import java.io.IOException;\n-\n /**\n  * This servlet filter sets response headers that enable browser protection against several classes if Web attacks.\n  * The list of headers is mirrored in environment.rb as a workaround to Rack swallowing the headers..\n  */\n public class SecurityServletFilter implements Filter {\n \n-  @Override\n+  private static final Set<String> ALLOWED_HTTP_METHODS = ImmutableSet.of(\"DELETE\", \"GET\", \"POST\", \"PUT\");\n+\n   public void init(FilterConfig filterConfig) throws ServletException {","path":"server/sonar-server/src/main/java/org/sonar/server/platform/SecurityServletFilter.java","position":27,"original_position":27,"commit_id":"baf9c1adfaf90fccfde8857ac140afdf997f8c65","original_commit_id":"baf9c1adfaf90fccfde8857ac140afdf997f8c65","user":{"login":"SonarTech","id":1842438,"avatar_url":"https://avatars.githubusercontent.com/u/1842438?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarTech","html_url":"https://github.com/SonarTech","followers_url":"https://api.github.com/users/SonarTech/followers","following_url":"https://api.github.com/users/SonarTech/following{/other_user}","gists_url":"https://api.github.com/users/SonarTech/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarTech/subscriptions","organizations_url":"https://api.github.com/users/SonarTech/orgs","repos_url":"https://api.github.com/users/SonarTech/repos","events_url":"https://api.github.com/users/SonarTech/events{/privacy}","received_events_url":"https://api.github.com/users/SonarTech/received_events","type":"User","site_admin":false},"body":"![MAJOR](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/severity-major.png) Add the \"@Override\" annotation above this method signature [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](http://nemo.sonarqube.org/coding_rules#rule_key=squid%3AS1161)\n","created_at":"2015-09-29T20:10:35Z","updated_at":"2015-09-29T20:10:35Z","html_url":"https://github.com/SonarSource/sonarqube/pull/548#discussion_r40722366","pull_request_url":"https://api.github.com/repos/SonarSource/sonarqube/pulls/548","_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonarqube/pulls/comments/40722366"},"html":{"href":"https://github.com/SonarSource/sonarqube/pull/548#discussion_r40722366"},"pull_request":{"href":"https://api.github.com/repos/SonarSource/sonarqube/pulls/548"}}},"pull_request":{"url":"https://api.github.com/repos/SonarSource/sonarqube/pulls/548","id":46324171,"html_url":"https://github.com/SonarSource/sonarqube/pull/548","diff_url":"https://github.com/SonarSource/sonarqube/pull/548.diff","patch_url":"https://github.com/SonarSource/sonarqube/pull/548.patch","issue_url":"https://api.github.com/repos/SonarSource/sonarqube/issues/548","number":548,"state":"open","locked":false,"title":"SONAR-6881 Disable OPTIONS, HEAD and TRACE methods of web server","user":{"login":"simonbrandhof","id":414010,"avatar_url":"https://avatars.githubusercontent.com/u/414010?v=3","gravatar_id":"","url":"https://api.github.com/users/simonbrandhof","html_url":"https://github.com/simonbrandhof","followers_url":"https://api.github.com/users/simonbrandhof/followers","following_url":"https://api.github.com/users/simonbrandhof/following{/other_user}","gists_url":"https://api.github.com/users/simonbrandhof/gists{/gist_id}","starred_url":"https://api.github.com/users/simonbrandhof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonbrandhof/subscriptions","organizations_url":"https://api.github.com/users/simonbrandhof/orgs","repos_url":"https://api.github.com/users/simonbrandhof/repos","events_url":"https://api.github.com/users/simonbrandhof/events{/privacy}","received_events_url":"https://api.github.com/users/simonbrandhof/received_events","type":"User","site_admin":false},"body":"SONAR-6881 Disable OPTIONS, HEAD and TRACE methods of web server","created_at":"2015-09-29T19:58:22Z","updated_at":"2015-09-29T20:10:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5c869300becd5f9d5fff68eef89ef40e4c04522b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SonarSource/sonarqube/pulls/548/commits","review_comments_url":"https://api.github.com/repos/SonarSource/sonarqube/pulls/548/comments","review_comment_url":"https://api.github.com/repos/SonarSource/sonarqube/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarSource/sonarqube/issues/548/comments","statuses_url":"https://api.github.com/repos/SonarSource/sonarqube/statuses/baf9c1adfaf90fccfde8857ac140afdf997f8c65","head":{"label":"SonarSource:feature/SONAR-6881-restrict-http-methods","ref":"feature/SONAR-6881-restrict-http-methods","sha":"baf9c1adfaf90fccfde8857ac140afdf997f8c65","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":1222504,"name":"sonarqube","full_name":"SonarSource/sonarqube","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonarqube","description":"Put your technical debt under control","fork":false,"url":"https://api.github.com/repos/SonarSource/sonarqube","forks_url":"https://api.github.com/repos/SonarSource/sonarqube/forks","keys_url":"https://api.github.com/repos/SonarSource/sonarqube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonarqube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonarqube/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonarqube/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonarqube/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonarqube/events","assignees_url":"https://api.github.com/repos/SonarSource/sonarqube/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonarqube/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonarqube/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonarqube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonarqube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonarqube/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonarqube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonarqube/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonarqube/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonarqube/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonarqube/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonarqube/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonarqube/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonarqube/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonarqube/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonarqube/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonarqube/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonarqube/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonarqube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonarqube/merges","archive_url":"https://api.github.com/repos/SonarSource/sonarqube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonarqube/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonarqube/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonarqube/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonarqube/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonarqube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonarqube/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonarqube/releases{/id}","created_at":"2011-01-05T11:05:17Z","updated_at":"2015-09-29T02:18:33Z","pushed_at":"2015-09-29T19:58:23Z","git_url":"git://github.com/SonarSource/sonarqube.git","ssh_url":"git@github.com:SonarSource/sonarqube.git","clone_url":"https://github.com/SonarSource/sonarqube.git","svn_url":"https://github.com/SonarSource/sonarqube","homepage":"http://www.sonarqube.org","size":754836,"stargazers_count":759,"watchers_count":759,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":385,"mirror_url":null,"open_issues_count":10,"forks":385,"open_issues":10,"watchers":759,"default_branch":"master"}},"base":{"label":"SonarSource:master","ref":"master","sha":"a6d3158b27dc9a0018998af2439e42ba1ddda8a6","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":1222504,"name":"sonarqube","full_name":"SonarSource/sonarqube","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonarqube","description":"Put your technical debt under control","fork":false,"url":"https://api.github.com/repos/SonarSource/sonarqube","forks_url":"https://api.github.com/repos/SonarSource/sonarqube/forks","keys_url":"https://api.github.com/repos/SonarSource/sonarqube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonarqube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonarqube/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonarqube/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonarqube/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonarqube/events","assignees_url":"https://api.github.com/repos/SonarSource/sonarqube/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonarqube/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonarqube/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonarqube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonarqube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonarqube/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonarqube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonarqube/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonarqube/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonarqube/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonarqube/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonarqube/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonarqube/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonarqube/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonarqube/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonarqube/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonarqube/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonarqube/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonarqube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonarqube/merges","archive_url":"https://api.github.com/repos/SonarSource/sonarqube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonarqube/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonarqube/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonarqube/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonarqube/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonarqube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonarqube/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonarqube/releases{/id}","created_at":"2011-01-05T11:05:17Z","updated_at":"2015-09-29T02:18:33Z","pushed_at":"2015-09-29T19:58:23Z","git_url":"git://github.com/SonarSource/sonarqube.git","ssh_url":"git@github.com:SonarSource/sonarqube.git","clone_url":"https://github.com/SonarSource/sonarqube.git","svn_url":"https://github.com/SonarSource/sonarqube","homepage":"http://www.sonarqube.org","size":754836,"stargazers_count":759,"watchers_count":759,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":385,"mirror_url":null,"open_issues_count":10,"forks":385,"open_issues":10,"watchers":759,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonarqube/pulls/548"},"html":{"href":"https://github.com/SonarSource/sonarqube/pull/548"},"issue":{"href":"https://api.github.com/repos/SonarSource/sonarqube/issues/548"},"comments":{"href":"https://api.github.com/repos/SonarSource/sonarqube/issues/548/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarSource/sonarqube/pulls/548/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarSource/sonarqube/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarSource/sonarqube/pulls/548/commits"},"statuses":{"href":"https://api.github.com/repos/SonarSource/sonarqube/statuses/baf9c1adfaf90fccfde8857ac140afdf997f8c65"}}}}