{"action":"opened","number":13,"pull_request":{"url":"https://api.github.com/repos/z11g/bashu-onlinejudge/pulls/13","id":99818486,"html_url":"https://github.com/z11g/bashu-onlinejudge/pull/13","diff_url":"https://github.com/z11g/bashu-onlinejudge/pull/13.diff","patch_url":"https://github.com/z11g/bashu-onlinejudge/pull/13.patch","issue_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/issues/13","number":13,"state":"open","locked":false,"title":"Fix possible XSS injection","user":{"login":"jimmy19990","id":15964984,"avatar_url":"https://avatars.githubusercontent.com/u/15964984?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmy19990","html_url":"https://github.com/jimmy19990","followers_url":"https://api.github.com/users/jimmy19990/followers","following_url":"https://api.github.com/users/jimmy19990/following{/other_user}","gists_url":"https://api.github.com/users/jimmy19990/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmy19990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmy19990/subscriptions","organizations_url":"https://api.github.com/users/jimmy19990/orgs","repos_url":"https://api.github.com/users/jimmy19990/repos","events_url":"https://api.github.com/users/jimmy19990/events{/privacy}","received_events_url":"https://api.github.com/users/jimmy19990/received_events","type":"User","site_admin":false},"body":"漏洞测试链接:\r\nhttps://bashu-onlinejudge.rhcloud.com/code/board.php?problem_id=1000%22%3E%3Cscript%3Ealert(%27hi!%27);%3C/script%3E\r\n\r\nhttps://bashu-onlinejudge.rhcloud.com/code/record.php?problem_id=&user_id=%22%3E%3Cscript%3Ealert(%27hi%27)%3B%3C%2Fscript%3E&result=-1&lang=-1&way=none\r\n\r\n（这两个漏洞的发现都要感谢@CANGJINKONG）\r\n\r\n很感谢你们的开源BSOJ项目，你们的项目让我们学校在去年年底终于拥有了了一个自己的OJ（即CWOJ），之前以为BSOJ discontinue了觉得挺可惜所以就没有PR一些已经发现的小漏洞。近日发现项目仍在更新后就决定PR一下。\r\n\r\n由于我也是去年年底才开始自行学习php/js/html的，故我的修复代码很可能不是最好的，所以如果你有更好的修复方法忽略该PR就行了。\r\n\r\n谢谢！","created_at":"2017-01-01T06:30:42Z","updated_at":"2017-01-01T06:30:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/pulls/13/commits","review_comments_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/pulls/13/comments","review_comment_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/issues/13/comments","statuses_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/statuses/94d09e333212b05d08edadf2d9d599d3c7275572","head":{"label":"jimmy19990:master","ref":"master","sha":"94d09e333212b05d08edadf2d9d599d3c7275572","user":{"login":"jimmy19990","id":15964984,"avatar_url":"https://avatars.githubusercontent.com/u/15964984?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmy19990","html_url":"https://github.com/jimmy19990","followers_url":"https://api.github.com/users/jimmy19990/followers","following_url":"https://api.github.com/users/jimmy19990/following{/other_user}","gists_url":"https://api.github.com/users/jimmy19990/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmy19990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmy19990/subscriptions","organizations_url":"https://api.github.com/users/jimmy19990/orgs","repos_url":"https://api.github.com/users/jimmy19990/repos","events_url":"https://api.github.com/users/jimmy19990/events{/privacy}","received_events_url":"https://api.github.com/users/jimmy19990/received_events","type":"User","site_admin":false},"repo":{"id":77767816,"name":"bashu-onlinejudge","full_name":"jimmy19990/bashu-onlinejudge","owner":{"login":"jimmy19990","id":15964984,"avatar_url":"https://avatars.githubusercontent.com/u/15964984?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmy19990","html_url":"https://github.com/jimmy19990","followers_url":"https://api.github.com/users/jimmy19990/followers","following_url":"https://api.github.com/users/jimmy19990/following{/other_user}","gists_url":"https://api.github.com/users/jimmy19990/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmy19990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmy19990/subscriptions","organizations_url":"https://api.github.com/users/jimmy19990/orgs","repos_url":"https://api.github.com/users/jimmy19990/repos","events_url":"https://api.github.com/users/jimmy19990/events{/privacy}","received_events_url":"https://api.github.com/users/jimmy19990/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jimmy19990/bashu-onlinejudge","description":"An online judge system designed for OI training. Demo: ","fork":true,"url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge","forks_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/forks","keys_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/teams","hooks_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/hooks","issue_events_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/issues/events{/number}","events_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/events","assignees_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/assignees{/user}","branches_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/branches{/branch}","tags_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/tags","blobs_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/statuses/{sha}","languages_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/languages","stargazers_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/stargazers","contributors_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/contributors","subscribers_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/subscribers","subscription_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/subscription","commits_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/contents/{+path}","compare_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/merges","archive_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/downloads","issues_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/issues{/number}","pulls_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/pulls{/number}","milestones_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/milestones{/number}","notifications_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/labels{/name}","releases_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/releases{/id}","deployments_url":"https://api.github.com/repos/jimmy19990/bashu-onlinejudge/deployments","created_at":"2017-01-01T06:03:14Z","updated_at":"2017-01-01T06:03:18Z","pushed_at":"2017-01-01T06:23:13Z","git_url":"git://github.com/jimmy19990/bashu-onlinejudge.git","ssh_url":"git@github.com:jimmy19990/bashu-onlinejudge.git","clone_url":"https://github.com/jimmy19990/bashu-onlinejudge.git","svn_url":"https://github.com/jimmy19990/bashu-onlinejudge","homepage":"https://bashu-onlinejudge.rhcloud.com/code/","size":14226,"stargazers_count":0,"watchers_count":0,"language":"C","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":"z11g:master","ref":"master","sha":"356933fe0d26432068451ebc071998dac730ceb5","user":{"login":"z11g","id":2733275,"avatar_url":"https://avatars.githubusercontent.com/u/2733275?v=3","gravatar_id":"","url":"https://api.github.com/users/z11g","html_url":"https://github.com/z11g","followers_url":"https://api.github.com/users/z11g/followers","following_url":"https://api.github.com/users/z11g/following{/other_user}","gists_url":"https://api.github.com/users/z11g/gists{/gist_id}","starred_url":"https://api.github.com/users/z11g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z11g/subscriptions","organizations_url":"https://api.github.com/users/z11g/orgs","repos_url":"https://api.github.com/users/z11g/repos","events_url":"https://api.github.com/users/z11g/events{/privacy}","received_events_url":"https://api.github.com/users/z11g/received_events","type":"User","site_admin":false},"repo":{"id":6558556,"name":"bashu-onlinejudge","full_name":"z11g/bashu-onlinejudge","owner":{"login":"z11g","id":2733275,"avatar_url":"https://avatars.githubusercontent.com/u/2733275?v=3","gravatar_id":"","url":"https://api.github.com/users/z11g","html_url":"https://github.com/z11g","followers_url":"https://api.github.com/users/z11g/followers","following_url":"https://api.github.com/users/z11g/following{/other_user}","gists_url":"https://api.github.com/users/z11g/gists{/gist_id}","starred_url":"https://api.github.com/users/z11g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z11g/subscriptions","organizations_url":"https://api.github.com/users/z11g/orgs","repos_url":"https://api.github.com/users/z11g/repos","events_url":"https://api.github.com/users/z11g/events{/privacy}","received_events_url":"https://api.github.com/users/z11g/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/z11g/bashu-onlinejudge","description":"An online judge system designed for OI training. Demo: ","fork":false,"url":"https://api.github.com/repos/z11g/bashu-onlinejudge","forks_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/forks","keys_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/teams","hooks_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/hooks","issue_events_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/issues/events{/number}","events_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/events","assignees_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/assignees{/user}","branches_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/branches{/branch}","tags_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/tags","blobs_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/git/refs{/sha}","trees_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/statuses/{sha}","languages_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/languages","stargazers_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/stargazers","contributors_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/contributors","subscribers_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/subscribers","subscription_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/subscription","commits_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/commits{/sha}","git_commits_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/git/commits{/sha}","comments_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/comments{/number}","issue_comment_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/issues/comments{/number}","contents_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/contents/{+path}","compare_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/merges","archive_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/downloads","issues_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/issues{/number}","pulls_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/pulls{/number}","milestones_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/milestones{/number}","notifications_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/labels{/name}","releases_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/releases{/id}","deployments_url":"https://api.github.com/repos/z11g/bashu-onlinejudge/deployments","created_at":"2012-11-06T08:06:12Z","updated_at":"2016-12-20T13:37:53Z","pushed_at":"2016-12-31T06:46:44Z","git_url":"git://github.com/z11g/bashu-onlinejudge.git","ssh_url":"git@github.com:z11g/bashu-onlinejudge.git","clone_url":"https://github.com/z11g/bashu-onlinejudge.git","svn_url":"https://github.com/z11g/bashu-onlinejudge","homepage":"https://bashu-onlinejudge.rhcloud.com/code/","size":14226,"stargazers_count":22,"watchers_count":22,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":5,"forks":13,"open_issues":5,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/z11g/bashu-onlinejudge/pulls/13"},"html":{"href":"https://github.com/z11g/bashu-onlinejudge/pull/13"},"issue":{"href":"https://api.github.com/repos/z11g/bashu-onlinejudge/issues/13"},"comments":{"href":"https://api.github.com/repos/z11g/bashu-onlinejudge/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/z11g/bashu-onlinejudge/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/z11g/bashu-onlinejudge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/z11g/bashu-onlinejudge/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/z11g/bashu-onlinejudge/statuses/94d09e333212b05d08edadf2d9d599d3c7275572"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":3,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"jimmy19990"}}