{"action":"created","comment":{"url":"https://api.github.com/repos/owncloud/core/pulls/comments/129496305","pull_request_review_id":52274094,"id":129496305,"diff_hunk":"@@ -49,13 +54,27 @@ public function getCapabilities() {\n \t\t\t'string' => \\OC_Util::getVersionString(),\n \t\t\t'edition' => \\OC_Util::getEditionString(),\n \t\t];\n-\t\t\t\n+\n \t\t$result['capabilities'] = \\OC::$server->getCapabilitiesManager()->getCapabilities();\n \n \t\treturn ['data' => $result];\n \t}\n \n \t/**\n+\t * @PublicPage\n+\t * @NoCSRFRequired\n+\t */\n+\tpublic function options() {\n+\t\t// for cross-domain request checks\n+\t\theader(\"Access-Control-Allow-Origin: *\");","path":"core/Controller/CloudController.php","position":29,"original_position":29,"commit_id":"e1d211f72b0ea0de9838b23b7b19212e7e05e208","original_commit_id":"e1d211f72b0ea0de9838b23b7b19212e7e05e208","user":{"login":"Peter-Prochaska","id":7011327,"avatar_url":"https://avatars3.githubusercontent.com/u/7011327?v=4","gravatar_id":"","url":"https://api.github.com/users/Peter-Prochaska","html_url":"https://github.com/Peter-Prochaska","followers_url":"https://api.github.com/users/Peter-Prochaska/followers","following_url":"https://api.github.com/users/Peter-Prochaska/following{/other_user}","gists_url":"https://api.github.com/users/Peter-Prochaska/gists{/gist_id}","starred_url":"https://api.github.com/users/Peter-Prochaska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Peter-Prochaska/subscriptions","organizations_url":"https://api.github.com/users/Peter-Prochaska/orgs","repos_url":"https://api.github.com/users/Peter-Prochaska/repos","events_url":"https://api.github.com/users/Peter-Prochaska/events{/privacy}","received_events_url":"https://api.github.com/users/Peter-Prochaska/received_events","type":"User","site_admin":false},"body":"See above","created_at":"2017-07-26T07:15:31Z","updated_at":"2017-07-26T07:17:06Z","html_url":"https://github.com/owncloud/core/pull/28457#discussion_r129496305","pull_request_url":"https://api.github.com/repos/owncloud/core/pulls/28457","_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments/129496305"},"html":{"href":"https://github.com/owncloud/core/pull/28457#discussion_r129496305"},"pull_request":{"href":"https://api.github.com/repos/owncloud/core/pulls/28457"}}},"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/28457","id":131741133,"html_url":"https://github.com/owncloud/core/pull/28457","diff_url":"https://github.com/owncloud/core/pull/28457.diff","patch_url":"https://github.com/owncloud/core/pull/28457.patch","issue_url":"https://api.github.com/repos/owncloud/core/issues/28457","number":28457,"state":"open","locked":false,"title":"[WIP] Trying enabling CORS","user":{"login":"noveens","id":23054294,"avatar_url":"https://avatars2.githubusercontent.com/u/23054294?v=4","gravatar_id":"","url":"https://api.github.com/users/noveens","html_url":"https://github.com/noveens","followers_url":"https://api.github.com/users/noveens/followers","following_url":"https://api.github.com/users/noveens/following{/other_user}","gists_url":"https://api.github.com/users/noveens/gists{/gist_id}","starred_url":"https://api.github.com/users/noveens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noveens/subscriptions","organizations_url":"https://api.github.com/users/noveens/orgs","repos_url":"https://api.github.com/users/noveens/repos","events_url":"https://api.github.com/users/noveens/events{/privacy}","received_events_url":"https://api.github.com/users/noveens/received_events","type":"User","site_admin":false},"body":"<!--\r\nThanks for submitting a change to ownCloud!\r\n\r\nThis is the bug tracker for the Server component. Find other components at https://github.com/owncloud/core/blob/master/.github/CONTRIBUTING.md#guidelines\r\n\r\nFor fixing potential security issues please see https://owncloud.org/security/\r\n\r\nTo make it possible for us to get your change reviewed and merged please fill out below information carefully.\r\n\r\nPlease note that any kind of change first has to be submitted to the master branch which holds the next major version of ownCloud.\r\n\r\nWe will carefully discuss if your change can or has to be backported to stable branches.\r\n-->\r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\nManually added the * header\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\nTrying to enable CORS.\r\n\r\n## Testing instructions:\r\n1. Download this file: https://github.com/noveens/js-owncloud-client/blob/master/browser/bundle.js\r\n2. Create a html file in the same directory with the following code.\r\n```html\r\n<!DOCTYPE html>\r\n<html>\r\n\t<head>\r\n\t\t<title>owncloud Lib. test</title>\r\n\t\t<script type=\"text/javascript\" src=\"./bundle.js\"></script>\r\n\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\t// var oc is global\r\n\t\t\toc.setInstance('PUT OC INSTANCE HERE');\r\n\t\t\t\r\n\t\t\toc.login('USERNAME', 'PASSWORD').then(status => {\r\n\t\t\t\talert(status);\r\n\t\t\t}).catch(error => {\r\n\t\t\t\talert(error);\r\n\t\t\t});\r\n\r\n\t\t</script>\r\n\t</head>\r\n\r\n\t<body>\r\n\t\tCheck the console.\r\n\t</body>\r\n</html>\r\n```\r\n\r\n3. Try sniffing the request to see it's response headers (Can be done using the Network tab on the right to Console in browser)\r\n\r\n@PVince81 \r\n\r\n","created_at":"2017-07-21T10:10:22Z","updated_at":"2017-07-26T07:17:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a263fcecfc43b4d0dd23bd8b0a095fe66ac29c5a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"PVince81","id":277525,"avatar_url":"https://avatars2.githubusercontent.com/u/277525?v=4","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/owncloud/core/pulls/28457/commits","review_comments_url":"https://api.github.com/repos/owncloud/core/pulls/28457/comments","review_comment_url":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/owncloud/core/issues/28457/comments","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/e1d211f72b0ea0de9838b23b7b19212e7e05e208","head":{"label":"owncloud:enablingCORS","ref":"enablingCORS","sha":"e1d211f72b0ea0de9838b23b7b19212e7e05e208","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/core","description":":cloud: ownCloud web server core (Files, DAV, etc.)","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","deployments_url":"https://api.github.com/repos/owncloud/core/deployments","created_at":"2012-08-25T10:32:48Z","updated_at":"2017-07-26T01:30:18Z","pushed_at":"2017-07-26T07:08:35Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":"https://owncloud.org/","size":224196,"stargazers_count":5412,"watchers_count":5412,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1719,"mirror_url":null,"open_issues_count":1680,"forks":1719,"open_issues":1680,"watchers":5412,"default_branch":"master"}},"base":{"label":"owncloud:master","ref":"master","sha":"d74b890e50c634382dc6bd888b81a2999b899688","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/core","description":":cloud: ownCloud web server core (Files, DAV, etc.)","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","deployments_url":"https://api.github.com/repos/owncloud/core/deployments","created_at":"2012-08-25T10:32:48Z","updated_at":"2017-07-26T01:30:18Z","pushed_at":"2017-07-26T07:08:35Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":"https://owncloud.org/","size":224196,"stargazers_count":5412,"watchers_count":5412,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1719,"mirror_url":null,"open_issues_count":1680,"forks":1719,"open_issues":1680,"watchers":5412,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/28457"},"html":{"href":"https://github.com/owncloud/core/pull/28457"},"issue":{"href":"https://api.github.com/repos/owncloud/core/issues/28457"},"comments":{"href":"https://api.github.com/repos/owncloud/core/issues/28457/comments"},"review_comments":{"href":"https://api.github.com/repos/owncloud/core/pulls/28457/comments"},"review_comment":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/owncloud/core/pulls/28457/commits"},"statuses":{"href":"https://api.github.com/repos/owncloud/core/statuses/e1d211f72b0ea0de9838b23b7b19212e7e05e208"}}}}
{"actor":{"display_login":"Peter-Prochaska"}}