{"action":"closed","number":999,"pull_request":{"url":"https://api.github.com/repos/jinzhu/gorm/pulls/999","id":69136532,"html_url":"https://github.com/jinzhu/gorm/pull/999","diff_url":"https://github.com/jinzhu/gorm/pull/999.diff","patch_url":"https://github.com/jinzhu/gorm/pull/999.patch","issue_url":"https://api.github.com/repos/jinzhu/gorm/issues/999","number":999,"state":"closed","locked":false,"title":"Fixed SQL injections with ORDER BY and GROUP BY.","user":{"login":"RichardKnop","id":2325888,"avatar_url":"https://avatars.githubusercontent.com/u/2325888?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardKnop","html_url":"https://github.com/RichardKnop","followers_url":"https://api.github.com/users/RichardKnop/followers","following_url":"https://api.github.com/users/RichardKnop/following{/other_user}","gists_url":"https://api.github.com/users/RichardKnop/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardKnop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardKnop/subscriptions","organizations_url":"https://api.github.com/users/RichardKnop/orgs","repos_url":"https://api.github.com/users/RichardKnop/repos","events_url":"https://api.github.com/users/RichardKnop/events{/privacy}","received_events_url":"https://api.github.com/users/RichardKnop/received_events","type":"User","site_admin":false},"body":"This quick PR aims to fix SQL injection possible with ORDER BY and GROUP BY query.\r\n\r\nMore tests should be added after this PR to test other kinds of queries for SQL injection!\r\n\r\n@jinzhu","created_at":"2016-05-06T11:09:50Z","updated_at":"2016-05-06T11:14:12Z","closed_at":"2016-05-06T11:14:12Z","merged_at":null,"merge_commit_sha":"b83a56b954f5bb2b5d196ea5f996c837c032d53e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jinzhu/gorm/pulls/999/commits","review_comments_url":"https://api.github.com/repos/jinzhu/gorm/pulls/999/comments","review_comment_url":"https://api.github.com/repos/jinzhu/gorm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jinzhu/gorm/issues/999/comments","statuses_url":"https://api.github.com/repos/jinzhu/gorm/statuses/037aaa89732573f6147bdf5c4d7a80175f2fb167","head":{"label":"RichardKnop:bugfix/sql-injection","ref":"bugfix/sql-injection","sha":"037aaa89732573f6147bdf5c4d7a80175f2fb167","user":{"login":"RichardKnop","id":2325888,"avatar_url":"https://avatars.githubusercontent.com/u/2325888?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardKnop","html_url":"https://github.com/RichardKnop","followers_url":"https://api.github.com/users/RichardKnop/followers","following_url":"https://api.github.com/users/RichardKnop/following{/other_user}","gists_url":"https://api.github.com/users/RichardKnop/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardKnop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardKnop/subscriptions","organizations_url":"https://api.github.com/users/RichardKnop/orgs","repos_url":"https://api.github.com/users/RichardKnop/repos","events_url":"https://api.github.com/users/RichardKnop/events{/privacy}","received_events_url":"https://api.github.com/users/RichardKnop/received_events","type":"User","site_admin":false},"repo":{"id":48054683,"name":"gorm","full_name":"RichardKnop/gorm","owner":{"login":"RichardKnop","id":2325888,"avatar_url":"https://avatars.githubusercontent.com/u/2325888?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardKnop","html_url":"https://github.com/RichardKnop","followers_url":"https://api.github.com/users/RichardKnop/followers","following_url":"https://api.github.com/users/RichardKnop/following{/other_user}","gists_url":"https://api.github.com/users/RichardKnop/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardKnop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardKnop/subscriptions","organizations_url":"https://api.github.com/users/RichardKnop/orgs","repos_url":"https://api.github.com/users/RichardKnop/repos","events_url":"https://api.github.com/users/RichardKnop/events{/privacy}","received_events_url":"https://api.github.com/users/RichardKnop/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RichardKnop/gorm","description":"The fantastic ORM library for Golang, aims to be developer friendly","fork":true,"url":"https://api.github.com/repos/RichardKnop/gorm","forks_url":"https://api.github.com/repos/RichardKnop/gorm/forks","keys_url":"https://api.github.com/repos/RichardKnop/gorm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RichardKnop/gorm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RichardKnop/gorm/teams","hooks_url":"https://api.github.com/repos/RichardKnop/gorm/hooks","issue_events_url":"https://api.github.com/repos/RichardKnop/gorm/issues/events{/number}","events_url":"https://api.github.com/repos/RichardKnop/gorm/events","assignees_url":"https://api.github.com/repos/RichardKnop/gorm/assignees{/user}","branches_url":"https://api.github.com/repos/RichardKnop/gorm/branches{/branch}","tags_url":"https://api.github.com/repos/RichardKnop/gorm/tags","blobs_url":"https://api.github.com/repos/RichardKnop/gorm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RichardKnop/gorm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RichardKnop/gorm/git/refs{/sha}","trees_url":"https://api.github.com/repos/RichardKnop/gorm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RichardKnop/gorm/statuses/{sha}","languages_url":"https://api.github.com/repos/RichardKnop/gorm/languages","stargazers_url":"https://api.github.com/repos/RichardKnop/gorm/stargazers","contributors_url":"https://api.github.com/repos/RichardKnop/gorm/contributors","subscribers_url":"https://api.github.com/repos/RichardKnop/gorm/subscribers","subscription_url":"https://api.github.com/repos/RichardKnop/gorm/subscription","commits_url":"https://api.github.com/repos/RichardKnop/gorm/commits{/sha}","git_commits_url":"https://api.github.com/repos/RichardKnop/gorm/git/commits{/sha}","comments_url":"https://api.github.com/repos/RichardKnop/gorm/comments{/number}","issue_comment_url":"https://api.github.com/repos/RichardKnop/gorm/issues/comments{/number}","contents_url":"https://api.github.com/repos/RichardKnop/gorm/contents/{+path}","compare_url":"https://api.github.com/repos/RichardKnop/gorm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RichardKnop/gorm/merges","archive_url":"https://api.github.com/repos/RichardKnop/gorm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RichardKnop/gorm/downloads","issues_url":"https://api.github.com/repos/RichardKnop/gorm/issues{/number}","pulls_url":"https://api.github.com/repos/RichardKnop/gorm/pulls{/number}","milestones_url":"https://api.github.com/repos/RichardKnop/gorm/milestones{/number}","notifications_url":"https://api.github.com/repos/RichardKnop/gorm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RichardKnop/gorm/labels{/name}","releases_url":"https://api.github.com/repos/RichardKnop/gorm/releases{/id}","deployments_url":"https://api.github.com/repos/RichardKnop/gorm/deployments","created_at":"2015-12-15T16:15:46Z","updated_at":"2016-02-14T07:02:38Z","pushed_at":"2016-05-06T11:14:12Z","git_url":"git://github.com/RichardKnop/gorm.git","ssh_url":"git@github.com:RichardKnop/gorm.git","clone_url":"https://github.com/RichardKnop/gorm.git","svn_url":"https://github.com/RichardKnop/gorm","homepage":"","size":1893,"stargazers_count":1,"watchers_count":1,"language":"Go","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":1,"default_branch":"master"}},"base":{"label":"jinzhu:master","ref":"master","sha":"bf413d67d3a25d4eeddb28541283fa6434d1cdb5","user":{"login":"jinzhu","id":6843,"avatar_url":"https://avatars.githubusercontent.com/u/6843?v=3","gravatar_id":"","url":"https://api.github.com/users/jinzhu","html_url":"https://github.com/jinzhu","followers_url":"https://api.github.com/users/jinzhu/followers","following_url":"https://api.github.com/users/jinzhu/following{/other_user}","gists_url":"https://api.github.com/users/jinzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/jinzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinzhu/subscriptions","organizations_url":"https://api.github.com/users/jinzhu/orgs","repos_url":"https://api.github.com/users/jinzhu/repos","events_url":"https://api.github.com/users/jinzhu/events{/privacy}","received_events_url":"https://api.github.com/users/jinzhu/received_events","type":"User","site_admin":false},"repo":{"id":13855476,"name":"gorm","full_name":"jinzhu/gorm","owner":{"login":"jinzhu","id":6843,"avatar_url":"https://avatars.githubusercontent.com/u/6843?v=3","gravatar_id":"","url":"https://api.github.com/users/jinzhu","html_url":"https://github.com/jinzhu","followers_url":"https://api.github.com/users/jinzhu/followers","following_url":"https://api.github.com/users/jinzhu/following{/other_user}","gists_url":"https://api.github.com/users/jinzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/jinzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinzhu/subscriptions","organizations_url":"https://api.github.com/users/jinzhu/orgs","repos_url":"https://api.github.com/users/jinzhu/repos","events_url":"https://api.github.com/users/jinzhu/events{/privacy}","received_events_url":"https://api.github.com/users/jinzhu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jinzhu/gorm","description":"The fantastic ORM library for Golang, aims to be developer friendly","fork":false,"url":"https://api.github.com/repos/jinzhu/gorm","forks_url":"https://api.github.com/repos/jinzhu/gorm/forks","keys_url":"https://api.github.com/repos/jinzhu/gorm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jinzhu/gorm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jinzhu/gorm/teams","hooks_url":"https://api.github.com/repos/jinzhu/gorm/hooks","issue_events_url":"https://api.github.com/repos/jinzhu/gorm/issues/events{/number}","events_url":"https://api.github.com/repos/jinzhu/gorm/events","assignees_url":"https://api.github.com/repos/jinzhu/gorm/assignees{/user}","branches_url":"https://api.github.com/repos/jinzhu/gorm/branches{/branch}","tags_url":"https://api.github.com/repos/jinzhu/gorm/tags","blobs_url":"https://api.github.com/repos/jinzhu/gorm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jinzhu/gorm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jinzhu/gorm/git/refs{/sha}","trees_url":"https://api.github.com/repos/jinzhu/gorm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jinzhu/gorm/statuses/{sha}","languages_url":"https://api.github.com/repos/jinzhu/gorm/languages","stargazers_url":"https://api.github.com/repos/jinzhu/gorm/stargazers","contributors_url":"https://api.github.com/repos/jinzhu/gorm/contributors","subscribers_url":"https://api.github.com/repos/jinzhu/gorm/subscribers","subscription_url":"https://api.github.com/repos/jinzhu/gorm/subscription","commits_url":"https://api.github.com/repos/jinzhu/gorm/commits{/sha}","git_commits_url":"https://api.github.com/repos/jinzhu/gorm/git/commits{/sha}","comments_url":"https://api.github.com/repos/jinzhu/gorm/comments{/number}","issue_comment_url":"https://api.github.com/repos/jinzhu/gorm/issues/comments{/number}","contents_url":"https://api.github.com/repos/jinzhu/gorm/contents/{+path}","compare_url":"https://api.github.com/repos/jinzhu/gorm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jinzhu/gorm/merges","archive_url":"https://api.github.com/repos/jinzhu/gorm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jinzhu/gorm/downloads","issues_url":"https://api.github.com/repos/jinzhu/gorm/issues{/number}","pulls_url":"https://api.github.com/repos/jinzhu/gorm/pulls{/number}","milestones_url":"https://api.github.com/repos/jinzhu/gorm/milestones{/number}","notifications_url":"https://api.github.com/repos/jinzhu/gorm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jinzhu/gorm/labels{/name}","releases_url":"https://api.github.com/repos/jinzhu/gorm/releases{/id}","deployments_url":"https://api.github.com/repos/jinzhu/gorm/deployments","created_at":"2013-10-25T08:31:38Z","updated_at":"2016-05-06T08:40:55Z","pushed_at":"2016-05-06T11:09:51Z","git_url":"git://github.com/jinzhu/gorm.git","ssh_url":"git@github.com:jinzhu/gorm.git","clone_url":"https://github.com/jinzhu/gorm.git","svn_url":"https://github.com/jinzhu/gorm","homepage":"http://jinzhu.github.io/gorm","size":3268,"stargazers_count":3712,"watchers_count":3712,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":428,"mirror_url":null,"open_issues_count":42,"forks":428,"open_issues":42,"watchers":3712,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jinzhu/gorm/pulls/999"},"html":{"href":"https://github.com/jinzhu/gorm/pull/999"},"issue":{"href":"https://api.github.com/repos/jinzhu/gorm/issues/999"},"comments":{"href":"https://api.github.com/repos/jinzhu/gorm/issues/999/comments"},"review_comments":{"href":"https://api.github.com/repos/jinzhu/gorm/pulls/999/comments"},"review_comment":{"href":"https://api.github.com/repos/jinzhu/gorm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jinzhu/gorm/pulls/999/commits"},"statuses":{"href":"https://api.github.com/repos/jinzhu/gorm/statuses/037aaa89732573f6147bdf5c4d7a80175f2fb167"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":135,"deletions":3,"changed_files":3}}