{"action":"created","comment":{"url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/comments/183709906","pull_request_review_id":114757588,"id":183709906,"diff_hunk":"@@ -1065,15 +1065,23 @@ function rtmedia_api_process_rtmedia_gallery_request() {\n \t\t$media_type_temp  = filter_input( INPUT_POST, 'media_type', FILTER_SANITIZE_STRING );\n \t\t$media_type_array = filter_input( INPUT_POST, 'media_type', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );\n \n-\t\tif ( ! empty( $media_type_temp ) || ! empty( $media_type_array ) ) {\n-\t\t\tif ( ! is_array( $media_type_array ) ) {\n-\t\t\t\t$media_type = explode( ',', $media_type_array );\n-\t\t\t} else {\n-\t\t\t\t$media_type = $media_type_temp;\n-\t\t\t}\n-\t\t\t//Check array for currently allowed media types\n-\t\t\t$media_type = array_intersect( $media_type, $allowed_types );\n-\t\t}\n+\t\tif ( ! empty( $media_type_temp ) ) {\n+\t\t\t/**\n+\t\t\t * Explode by , when string found\n+\t\t\t */\n+\t\t\t$media_type = explode( ',', $media_type_temp );\n+\t\t} elseif ( ! empty( $media_type_array ) && is_array( $media_type_array ) ) {\n+\t\t\t/**\n+\t\t\t * Set media_type to passed array","path":"app/main/controllers/api/RTMediaJsonApi.php","position":20,"original_position":20,"commit_id":"fab6845a78f064d89a91c40c4f327980eef703cf","original_commit_id":"fab6845a78f064d89a91c40c4f327980eef703cf","user":{"login":"chandrapatel","id":9443225,"avatar_url":"https://avatars1.githubusercontent.com/u/9443225?v=4","gravatar_id":"","url":"https://api.github.com/users/chandrapatel","html_url":"https://github.com/chandrapatel","followers_url":"https://api.github.com/users/chandrapatel/followers","following_url":"https://api.github.com/users/chandrapatel/following{/other_user}","gists_url":"https://api.github.com/users/chandrapatel/gists{/gist_id}","starred_url":"https://api.github.com/users/chandrapatel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chandrapatel/subscriptions","organizations_url":"https://api.github.com/users/chandrapatel/orgs","repos_url":"https://api.github.com/users/chandrapatel/repos","events_url":"https://api.github.com/users/chandrapatel/events{/privacy}","received_events_url":"https://api.github.com/users/chandrapatel/received_events","type":"User","site_admin":false},"body":"Use // comment style instead for inline comments.","created_at":"2018-04-24T12:29:34Z","updated_at":"2018-04-24T12:33:44Z","html_url":"https://github.com/rtMediaWP/rtMedia/pull/1100#discussion_r183709906","pull_request_url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1100","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/comments/183709906"},"html":{"href":"https://github.com/rtMediaWP/rtMedia/pull/1100#discussion_r183709906"},"pull_request":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1100"}}},"pull_request":{"url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1100","id":183712294,"html_url":"https://github.com/rtMediaWP/rtMedia/pull/1100","diff_url":"https://github.com/rtMediaWP/rtMedia/pull/1100.diff","patch_url":"https://github.com/rtMediaWP/rtMedia/pull/1100.patch","issue_url":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/1100","number":1100,"state":"open","locked":false,"title":"Modified filter checks for media_type and per_page parameters","user":{"login":"SID177","id":23107546,"avatar_url":"https://avatars0.githubusercontent.com/u/23107546?v=4","gravatar_id":"","url":"https://api.github.com/users/SID177","html_url":"https://github.com/SID177","followers_url":"https://api.github.com/users/SID177/followers","following_url":"https://api.github.com/users/SID177/following{/other_user}","gists_url":"https://api.github.com/users/SID177/gists{/gist_id}","starred_url":"https://api.github.com/users/SID177/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SID177/subscriptions","organizations_url":"https://api.github.com/users/SID177/orgs","repos_url":"https://api.github.com/users/SID177/repos","events_url":"https://api.github.com/users/SID177/events{/privacy}","received_events_url":"https://api.github.com/users/SID177/received_events","type":"User","site_admin":false},"body":"The filter and sanitization on `media_type` and `per_page` parameters was not working. I changed it accordingly in order to work properly.\r\n\r\nIssue: #1099 ","created_at":"2018-04-24T12:00:39Z","updated_at":"2018-04-24T12:33:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e69a163ded1101705f7a006c52763a0307c00116","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1100/commits","review_comments_url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1100/comments","review_comment_url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/1100/comments","statuses_url":"https://api.github.com/repos/rtMediaWP/rtMedia/statuses/fab6845a78f064d89a91c40c4f327980eef703cf","head":{"label":"SID177:GH-1099","ref":"GH-1099","sha":"fab6845a78f064d89a91c40c4f327980eef703cf","user":{"login":"SID177","id":23107546,"avatar_url":"https://avatars0.githubusercontent.com/u/23107546?v=4","gravatar_id":"","url":"https://api.github.com/users/SID177","html_url":"https://github.com/SID177","followers_url":"https://api.github.com/users/SID177/followers","following_url":"https://api.github.com/users/SID177/following{/other_user}","gists_url":"https://api.github.com/users/SID177/gists{/gist_id}","starred_url":"https://api.github.com/users/SID177/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SID177/subscriptions","organizations_url":"https://api.github.com/users/SID177/orgs","repos_url":"https://api.github.com/users/SID177/repos","events_url":"https://api.github.com/users/SID177/events{/privacy}","received_events_url":"https://api.github.com/users/SID177/received_events","type":"User","site_admin":false},"repo":{"id":123583777,"name":"rtMedia","full_name":"SID177/rtMedia","owner":{"login":"SID177","id":23107546,"avatar_url":"https://avatars0.githubusercontent.com/u/23107546?v=4","gravatar_id":"","url":"https://api.github.com/users/SID177","html_url":"https://github.com/SID177","followers_url":"https://api.github.com/users/SID177/followers","following_url":"https://api.github.com/users/SID177/following{/other_user}","gists_url":"https://api.github.com/users/SID177/gists{/gist_id}","starred_url":"https://api.github.com/users/SID177/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SID177/subscriptions","organizations_url":"https://api.github.com/users/SID177/orgs","repos_url":"https://api.github.com/users/SID177/repos","events_url":"https://api.github.com/users/SID177/events{/privacy}","received_events_url":"https://api.github.com/users/SID177/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SID177/rtMedia","description":"rtMedia (formerly Buddypress Media) adds advanced multimedia functionality to WordPress, BuddyPress and bbPress","fork":true,"url":"https://api.github.com/repos/SID177/rtMedia","forks_url":"https://api.github.com/repos/SID177/rtMedia/forks","keys_url":"https://api.github.com/repos/SID177/rtMedia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SID177/rtMedia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SID177/rtMedia/teams","hooks_url":"https://api.github.com/repos/SID177/rtMedia/hooks","issue_events_url":"https://api.github.com/repos/SID177/rtMedia/issues/events{/number}","events_url":"https://api.github.com/repos/SID177/rtMedia/events","assignees_url":"https://api.github.com/repos/SID177/rtMedia/assignees{/user}","branches_url":"https://api.github.com/repos/SID177/rtMedia/branches{/branch}","tags_url":"https://api.github.com/repos/SID177/rtMedia/tags","blobs_url":"https://api.github.com/repos/SID177/rtMedia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SID177/rtMedia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SID177/rtMedia/git/refs{/sha}","trees_url":"https://api.github.com/repos/SID177/rtMedia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SID177/rtMedia/statuses/{sha}","languages_url":"https://api.github.com/repos/SID177/rtMedia/languages","stargazers_url":"https://api.github.com/repos/SID177/rtMedia/stargazers","contributors_url":"https://api.github.com/repos/SID177/rtMedia/contributors","subscribers_url":"https://api.github.com/repos/SID177/rtMedia/subscribers","subscription_url":"https://api.github.com/repos/SID177/rtMedia/subscription","commits_url":"https://api.github.com/repos/SID177/rtMedia/commits{/sha}","git_commits_url":"https://api.github.com/repos/SID177/rtMedia/git/commits{/sha}","comments_url":"https://api.github.com/repos/SID177/rtMedia/comments{/number}","issue_comment_url":"https://api.github.com/repos/SID177/rtMedia/issues/comments{/number}","contents_url":"https://api.github.com/repos/SID177/rtMedia/contents/{+path}","compare_url":"https://api.github.com/repos/SID177/rtMedia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SID177/rtMedia/merges","archive_url":"https://api.github.com/repos/SID177/rtMedia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SID177/rtMedia/downloads","issues_url":"https://api.github.com/repos/SID177/rtMedia/issues{/number}","pulls_url":"https://api.github.com/repos/SID177/rtMedia/pulls{/number}","milestones_url":"https://api.github.com/repos/SID177/rtMedia/milestones{/number}","notifications_url":"https://api.github.com/repos/SID177/rtMedia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SID177/rtMedia/labels{/name}","releases_url":"https://api.github.com/repos/SID177/rtMedia/releases{/id}","deployments_url":"https://api.github.com/repos/SID177/rtMedia/deployments","created_at":"2018-03-02T13:41:49Z","updated_at":"2018-04-02T07:09:09Z","pushed_at":"2018-04-24T12:19:11Z","git_url":"git://github.com/SID177/rtMedia.git","ssh_url":"git@github.com:SID177/rtMedia.git","clone_url":"https://github.com/SID177/rtMedia.git","svn_url":"https://github.com/SID177/rtMedia","homepage":"https://rtmedia.io/","size":33478,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"rtMediaWP:develop","ref":"develop","sha":"d17d41665496eb8a5a99ecdbdea703683bf47d44","user":{"login":"rtMediaWP","id":16647576,"avatar_url":"https://avatars1.githubusercontent.com/u/16647576?v=4","gravatar_id":"","url":"https://api.github.com/users/rtMediaWP","html_url":"https://github.com/rtMediaWP","followers_url":"https://api.github.com/users/rtMediaWP/followers","following_url":"https://api.github.com/users/rtMediaWP/following{/other_user}","gists_url":"https://api.github.com/users/rtMediaWP/gists{/gist_id}","starred_url":"https://api.github.com/users/rtMediaWP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtMediaWP/subscriptions","organizations_url":"https://api.github.com/users/rtMediaWP/orgs","repos_url":"https://api.github.com/users/rtMediaWP/repos","events_url":"https://api.github.com/users/rtMediaWP/events{/privacy}","received_events_url":"https://api.github.com/users/rtMediaWP/received_events","type":"Organization","site_admin":false},"repo":{"id":3785670,"name":"rtMedia","full_name":"rtMediaWP/rtMedia","owner":{"login":"rtMediaWP","id":16647576,"avatar_url":"https://avatars1.githubusercontent.com/u/16647576?v=4","gravatar_id":"","url":"https://api.github.com/users/rtMediaWP","html_url":"https://github.com/rtMediaWP","followers_url":"https://api.github.com/users/rtMediaWP/followers","following_url":"https://api.github.com/users/rtMediaWP/following{/other_user}","gists_url":"https://api.github.com/users/rtMediaWP/gists{/gist_id}","starred_url":"https://api.github.com/users/rtMediaWP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtMediaWP/subscriptions","organizations_url":"https://api.github.com/users/rtMediaWP/orgs","repos_url":"https://api.github.com/users/rtMediaWP/repos","events_url":"https://api.github.com/users/rtMediaWP/events{/privacy}","received_events_url":"https://api.github.com/users/rtMediaWP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rtMediaWP/rtMedia","description":"rtMedia (formerly Buddypress Media) adds advanced multimedia functionality to WordPress, BuddyPress and bbPress","fork":false,"url":"https://api.github.com/repos/rtMediaWP/rtMedia","forks_url":"https://api.github.com/repos/rtMediaWP/rtMedia/forks","keys_url":"https://api.github.com/repos/rtMediaWP/rtMedia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rtMediaWP/rtMedia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rtMediaWP/rtMedia/teams","hooks_url":"https://api.github.com/repos/rtMediaWP/rtMedia/hooks","issue_events_url":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/events{/number}","events_url":"https://api.github.com/repos/rtMediaWP/rtMedia/events","assignees_url":"https://api.github.com/repos/rtMediaWP/rtMedia/assignees{/user}","branches_url":"https://api.github.com/repos/rtMediaWP/rtMedia/branches{/branch}","tags_url":"https://api.github.com/repos/rtMediaWP/rtMedia/tags","blobs_url":"https://api.github.com/repos/rtMediaWP/rtMedia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rtMediaWP/rtMedia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rtMediaWP/rtMedia/git/refs{/sha}","trees_url":"https://api.github.com/repos/rtMediaWP/rtMedia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rtMediaWP/rtMedia/statuses/{sha}","languages_url":"https://api.github.com/repos/rtMediaWP/rtMedia/languages","stargazers_url":"https://api.github.com/repos/rtMediaWP/rtMedia/stargazers","contributors_url":"https://api.github.com/repos/rtMediaWP/rtMedia/contributors","subscribers_url":"https://api.github.com/repos/rtMediaWP/rtMedia/subscribers","subscription_url":"https://api.github.com/repos/rtMediaWP/rtMedia/subscription","commits_url":"https://api.github.com/repos/rtMediaWP/rtMedia/commits{/sha}","git_commits_url":"https://api.github.com/repos/rtMediaWP/rtMedia/git/commits{/sha}","comments_url":"https://api.github.com/repos/rtMediaWP/rtMedia/comments{/number}","issue_comment_url":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/comments{/number}","contents_url":"https://api.github.com/repos/rtMediaWP/rtMedia/contents/{+path}","compare_url":"https://api.github.com/repos/rtMediaWP/rtMedia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rtMediaWP/rtMedia/merges","archive_url":"https://api.github.com/repos/rtMediaWP/rtMedia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rtMediaWP/rtMedia/downloads","issues_url":"https://api.github.com/repos/rtMediaWP/rtMedia/issues{/number}","pulls_url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls{/number}","milestones_url":"https://api.github.com/repos/rtMediaWP/rtMedia/milestones{/number}","notifications_url":"https://api.github.com/repos/rtMediaWP/rtMedia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rtMediaWP/rtMedia/labels{/name}","releases_url":"https://api.github.com/repos/rtMediaWP/rtMedia/releases{/id}","deployments_url":"https://api.github.com/repos/rtMediaWP/rtMedia/deployments","created_at":"2012-03-21T10:54:03Z","updated_at":"2018-04-21T14:05:47Z","pushed_at":"2018-04-24T12:19:13Z","git_url":"git://github.com/rtMediaWP/rtMedia.git","ssh_url":"git@github.com:rtMediaWP/rtMedia.git","clone_url":"https://github.com/rtMediaWP/rtMedia.git","svn_url":"https://github.com/rtMediaWP/rtMedia","homepage":"https://rtmedia.io/","size":33424,"stargazers_count":77,"watchers_count":77,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":97,"mirror_url":null,"archived":false,"open_issues_count":78,"license":null,"forks":97,"open_issues":78,"watchers":77,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1100"},"html":{"href":"https://github.com/rtMediaWP/rtMedia/pull/1100"},"issue":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/1100"},"comments":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/1100/comments"},"review_comments":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1100/comments"},"review_comment":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1100/commits"},"statuses":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/statuses/fab6845a78f064d89a91c40c4f327980eef703cf"}},"author_association":"NONE"}}
{"actor":{"display_login":"chandrapatel"}}