{"action":"created","comment":{"url":"https://api.github.com/repos/minio/minio/pulls/comments/233269231","pull_request_review_id":174644828,"id":233269231,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzI2OTIzMQ==","diff_hunk":"@@ -1452,8 +1452,30 @@ type PresignedGetRep struct {\n func (web *webAPIHandlers) PresignedGet(r *http.Request, args *PresignedGetArgs, reply *PresignedGetRep) error {\n \tclaims, owner, authErr := webRequestAuthenticate(r)\n \tif authErr != nil {\n+\t\tif authErr == errNoAuthToken {\n+\t\t\t// Check if anonymous (non-owner) has access to download objects.\n+\t\t\tif !globalPolicySys.IsAllowed(policy.Args{\n+\t\t\t\tAction:          policy.GetObjectAction,\n+\t\t\t\tBucketName:      args.BucketName,\n+\t\t\t\tConditionValues: getConditionValues(r, \"\"),\n+\t\t\t\tIsOwner:         false,\n+\t\t\t\tObjectName:      args.ObjectName,\n+\t\t\t}) {\n+\t\t\t\treturn toJSONError(errAuthentication)\n+\t\t\t}\n+\t\t\treply.UIVersion = browser.UIVersion\n+\t\t\treply.URL = args.HostName + s3utils.EncodePath(\"/\"+path.Join(args.BucketName, args.ObjectName))\n+\t\t\treturn nil\n+\t\t}\n \t\treturn toJSONError(authErr)\n \t}\n+\n+\tif args.BucketName == \"\" || args.ObjectName == \"\" {\n+\t\treturn &json2.Error{\n+\t\t\tMessage: \"Bucket and Object are mandatory arguments.\",\n+\t\t}\n+\t}","path":"cmd/web-handlers.go","position":null,"original_position":26,"commit_id":"50b7b0a7378e17073a4de5081381c5ed68c836a3","original_commit_id":"ee85152625857321240b3f9d75688f7f8d95c2dd","user":{"login":"krishnasrinivas","id":634494,"node_id":"MDQ6VXNlcjYzNDQ5NA==","avatar_url":"https://avatars0.githubusercontent.com/u/634494?v=4","gravatar_id":"","url":"https://api.github.com/users/krishnasrinivas","html_url":"https://github.com/krishnasrinivas","followers_url":"https://api.github.com/users/krishnasrinivas/followers","following_url":"https://api.github.com/users/krishnasrinivas/following{/other_user}","gists_url":"https://api.github.com/users/krishnasrinivas/gists{/gist_id}","starred_url":"https://api.github.com/users/krishnasrinivas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishnasrinivas/subscriptions","organizations_url":"https://api.github.com/users/krishnasrinivas/orgs","repos_url":"https://api.github.com/users/krishnasrinivas/repos","events_url":"https://api.github.com/users/krishnasrinivas/events{/privacy}","received_events_url":"https://api.github.com/users/krishnasrinivas/received_events","type":"User","site_admin":false},"body":"do you want to fix the code for zip also:\r\n```\r\n--- a/browser/app/js/objects/actions.js\r\n+++ b/browser/app/js/objects/actions.js\r\n@@ -308,7 +308,7 @@ export const downloadCheckedObjects = () => {\r\n       objects: getCheckedList(state)\r\n     }\r\n     if (!web.LoggedIn()) {\r\n-      const requestUrl = location.origin + \"/minio/zip?token=''\"\r\n+      const requestUrl = location.origin + \"/minio/zip?token=\"\r\n       downloadZip(requestUrl, req, dispatch)\r\n     } else {\r\n       return web\r\n```\r\n","created_at":"2018-11-13T23:58:56Z","updated_at":"2018-11-13T23:58:56Z","html_url":"https://github.com/minio/minio/pull/6800#discussion_r233269231","pull_request_url":"https://api.github.com/repos/minio/minio/pulls/6800","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/minio/minio/pulls/comments/233269231"},"html":{"href":"https://github.com/minio/minio/pull/6800#discussion_r233269231"},"pull_request":{"href":"https://api.github.com/repos/minio/minio/pulls/6800"}},"in_reply_to_id":233263595},"pull_request":{"url":"https://api.github.com/repos/minio/minio/pulls/6800","id":230241634,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMjQxNjM0","html_url":"https://github.com/minio/minio/pull/6800","diff_url":"https://github.com/minio/minio/pull/6800.diff","patch_url":"https://github.com/minio/minio/pull/6800.patch","issue_url":"https://api.github.com/repos/minio/minio/issues/6800","number":6800,"state":"open","locked":false,"title":"Fix anonymous downloads URL generation","user":{"login":"harshavardhana","id":622699,"node_id":"MDQ6VXNlcjYyMjY5OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/622699?v=4","gravatar_id":"","url":"https://api.github.com/users/harshavardhana","html_url":"https://github.com/harshavardhana","followers_url":"https://api.github.com/users/harshavardhana/followers","following_url":"https://api.github.com/users/harshavardhana/following{/other_user}","gists_url":"https://api.github.com/users/harshavardhana/gists{/gist_id}","starred_url":"https://api.github.com/users/harshavardhana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harshavardhana/subscriptions","organizations_url":"https://api.github.com/users/harshavardhana/orgs","repos_url":"https://api.github.com/users/harshavardhana/repos","events_url":"https://api.github.com/users/harshavardhana/events{/privacy}","received_events_url":"https://api.github.com/users/harshavardhana/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n## Description\r\nFix anonymous downloads URL generation\r\n<!--- Describe your changes in detail -->\r\n\r\n## Motivation and Context\r\nFixes #6778\r\n\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\n\r\n## Regression\r\nYes\r\n<!-- Is this PR fixing a regression? (Yes / No) -->\r\n<!-- If Yes, optionally please include minio version or commit id or PR# that caused this regression, if you have these details. -->\r\n\r\n## How Has This Been Tested?\r\nFollow the steps mentioned in issue #6778 by building the PR locally. \r\n\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n- [ ] I have added unit tests to cover my changes.\r\n- [ ] I have added/updated functional tests in [mint](https://github.com/minio/mint). (If yes, add `mint` PR # here: )\r\n- [x] All new and existing tests passed.","created_at":"2018-11-12T19:21:47Z","updated_at":"2018-11-13T23:58:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24ffe77eee903616d2365279c8b1ac61d190716c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/minio/minio/pulls/6800/commits","review_comments_url":"https://api.github.com/repos/minio/minio/pulls/6800/comments","review_comment_url":"https://api.github.com/repos/minio/minio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minio/minio/issues/6800/comments","statuses_url":"https://api.github.com/repos/minio/minio/statuses/50b7b0a7378e17073a4de5081381c5ed68c836a3","head":{"label":"harshavardhana:fix-anonymous","ref":"fix-anonymous","sha":"50b7b0a7378e17073a4de5081381c5ed68c836a3","user":{"login":"harshavardhana","id":622699,"node_id":"MDQ6VXNlcjYyMjY5OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/622699?v=4","gravatar_id":"","url":"https://api.github.com/users/harshavardhana","html_url":"https://github.com/harshavardhana","followers_url":"https://api.github.com/users/harshavardhana/followers","following_url":"https://api.github.com/users/harshavardhana/following{/other_user}","gists_url":"https://api.github.com/users/harshavardhana/gists{/gist_id}","starred_url":"https://api.github.com/users/harshavardhana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harshavardhana/subscriptions","organizations_url":"https://api.github.com/users/harshavardhana/orgs","repos_url":"https://api.github.com/users/harshavardhana/repos","events_url":"https://api.github.com/users/harshavardhana/events{/privacy}","received_events_url":"https://api.github.com/users/harshavardhana/received_events","type":"User","site_admin":false},"repo":{"id":29261868,"node_id":"MDEwOlJlcG9zaXRvcnkyOTI2MTg2OA==","name":"minio","full_name":"harshavardhana/minio","private":false,"owner":{"login":"harshavardhana","id":622699,"node_id":"MDQ6VXNlcjYyMjY5OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/622699?v=4","gravatar_id":"","url":"https://api.github.com/users/harshavardhana","html_url":"https://github.com/harshavardhana","followers_url":"https://api.github.com/users/harshavardhana/followers","following_url":"https://api.github.com/users/harshavardhana/following{/other_user}","gists_url":"https://api.github.com/users/harshavardhana/gists{/gist_id}","starred_url":"https://api.github.com/users/harshavardhana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harshavardhana/subscriptions","organizations_url":"https://api.github.com/users/harshavardhana/orgs","repos_url":"https://api.github.com/users/harshavardhana/repos","events_url":"https://api.github.com/users/harshavardhana/events{/privacy}","received_events_url":"https://api.github.com/users/harshavardhana/received_events","type":"User","site_admin":false},"html_url":"https://github.com/harshavardhana/minio","description":"Minio is open source Object Storage inspired from Amazon S3 API and Haystack Object Format","fork":true,"url":"https://api.github.com/repos/harshavardhana/minio","forks_url":"https://api.github.com/repos/harshavardhana/minio/forks","keys_url":"https://api.github.com/repos/harshavardhana/minio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harshavardhana/minio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harshavardhana/minio/teams","hooks_url":"https://api.github.com/repos/harshavardhana/minio/hooks","issue_events_url":"https://api.github.com/repos/harshavardhana/minio/issues/events{/number}","events_url":"https://api.github.com/repos/harshavardhana/minio/events","assignees_url":"https://api.github.com/repos/harshavardhana/minio/assignees{/user}","branches_url":"https://api.github.com/repos/harshavardhana/minio/branches{/branch}","tags_url":"https://api.github.com/repos/harshavardhana/minio/tags","blobs_url":"https://api.github.com/repos/harshavardhana/minio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harshavardhana/minio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harshavardhana/minio/git/refs{/sha}","trees_url":"https://api.github.com/repos/harshavardhana/minio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harshavardhana/minio/statuses/{sha}","languages_url":"https://api.github.com/repos/harshavardhana/minio/languages","stargazers_url":"https://api.github.com/repos/harshavardhana/minio/stargazers","contributors_url":"https://api.github.com/repos/harshavardhana/minio/contributors","subscribers_url":"https://api.github.com/repos/harshavardhana/minio/subscribers","subscription_url":"https://api.github.com/repos/harshavardhana/minio/subscription","commits_url":"https://api.github.com/repos/harshavardhana/minio/commits{/sha}","git_commits_url":"https://api.github.com/repos/harshavardhana/minio/git/commits{/sha}","comments_url":"https://api.github.com/repos/harshavardhana/minio/comments{/number}","issue_comment_url":"https://api.github.com/repos/harshavardhana/minio/issues/comments{/number}","contents_url":"https://api.github.com/repos/harshavardhana/minio/contents/{+path}","compare_url":"https://api.github.com/repos/harshavardhana/minio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harshavardhana/minio/merges","archive_url":"https://api.github.com/repos/harshavardhana/minio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harshavardhana/minio/downloads","issues_url":"https://api.github.com/repos/harshavardhana/minio/issues{/number}","pulls_url":"https://api.github.com/repos/harshavardhana/minio/pulls{/number}","milestones_url":"https://api.github.com/repos/harshavardhana/minio/milestones{/number}","notifications_url":"https://api.github.com/repos/harshavardhana/minio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harshavardhana/minio/labels{/name}","releases_url":"https://api.github.com/repos/harshavardhana/minio/releases{/id}","deployments_url":"https://api.github.com/repos/harshavardhana/minio/deployments","created_at":"2015-01-14T19:32:24Z","updated_at":"2016-12-15T12:35:45Z","pushed_at":"2018-11-13T23:41:47Z","git_url":"git://github.com/harshavardhana/minio.git","ssh_url":"git@github.com:harshavardhana/minio.git","clone_url":"https://github.com/harshavardhana/minio.git","svn_url":"https://github.com/harshavardhana/minio","homepage":"http://minio.io","size":45154,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2,"open_issues":0,"watchers":1,"default_branch":"pr_out_minio_dl_minio_io_changes_do_not_merge_until_webcli"}},"base":{"label":"minio:master","ref":"master","sha":"c82acc599ad3fd83518c9584b702e6ad942f7e31","user":{"login":"minio","id":695951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NTk1MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/695951?v=4","gravatar_id":"","url":"https://api.github.com/users/minio","html_url":"https://github.com/minio","followers_url":"https://api.github.com/users/minio/followers","following_url":"https://api.github.com/users/minio/following{/other_user}","gists_url":"https://api.github.com/users/minio/gists{/gist_id}","starred_url":"https://api.github.com/users/minio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minio/subscriptions","organizations_url":"https://api.github.com/users/minio/orgs","repos_url":"https://api.github.com/users/minio/repos","events_url":"https://api.github.com/users/minio/events{/privacy}","received_events_url":"https://api.github.com/users/minio/received_events","type":"Organization","site_admin":false},"repo":{"id":29261473,"node_id":"MDEwOlJlcG9zaXRvcnkyOTI2MTQ3Mw==","name":"minio","full_name":"minio/minio","private":false,"owner":{"login":"minio","id":695951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NTk1MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/695951?v=4","gravatar_id":"","url":"https://api.github.com/users/minio","html_url":"https://github.com/minio","followers_url":"https://api.github.com/users/minio/followers","following_url":"https://api.github.com/users/minio/following{/other_user}","gists_url":"https://api.github.com/users/minio/gists{/gist_id}","starred_url":"https://api.github.com/users/minio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minio/subscriptions","organizations_url":"https://api.github.com/users/minio/orgs","repos_url":"https://api.github.com/users/minio/repos","events_url":"https://api.github.com/users/minio/events{/privacy}","received_events_url":"https://api.github.com/users/minio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/minio/minio","description":"Minio is an open source object storage server compatible with Amazon S3 APIs","fork":false,"url":"https://api.github.com/repos/minio/minio","forks_url":"https://api.github.com/repos/minio/minio/forks","keys_url":"https://api.github.com/repos/minio/minio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minio/minio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minio/minio/teams","hooks_url":"https://api.github.com/repos/minio/minio/hooks","issue_events_url":"https://api.github.com/repos/minio/minio/issues/events{/number}","events_url":"https://api.github.com/repos/minio/minio/events","assignees_url":"https://api.github.com/repos/minio/minio/assignees{/user}","branches_url":"https://api.github.com/repos/minio/minio/branches{/branch}","tags_url":"https://api.github.com/repos/minio/minio/tags","blobs_url":"https://api.github.com/repos/minio/minio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minio/minio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minio/minio/git/refs{/sha}","trees_url":"https://api.github.com/repos/minio/minio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minio/minio/statuses/{sha}","languages_url":"https://api.github.com/repos/minio/minio/languages","stargazers_url":"https://api.github.com/repos/minio/minio/stargazers","contributors_url":"https://api.github.com/repos/minio/minio/contributors","subscribers_url":"https://api.github.com/repos/minio/minio/subscribers","subscription_url":"https://api.github.com/repos/minio/minio/subscription","commits_url":"https://api.github.com/repos/minio/minio/commits{/sha}","git_commits_url":"https://api.github.com/repos/minio/minio/git/commits{/sha}","comments_url":"https://api.github.com/repos/minio/minio/comments{/number}","issue_comment_url":"https://api.github.com/repos/minio/minio/issues/comments{/number}","contents_url":"https://api.github.com/repos/minio/minio/contents/{+path}","compare_url":"https://api.github.com/repos/minio/minio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minio/minio/merges","archive_url":"https://api.github.com/repos/minio/minio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minio/minio/downloads","issues_url":"https://api.github.com/repos/minio/minio/issues{/number}","pulls_url":"https://api.github.com/repos/minio/minio/pulls{/number}","milestones_url":"https://api.github.com/repos/minio/minio/milestones{/number}","notifications_url":"https://api.github.com/repos/minio/minio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minio/minio/labels{/name}","releases_url":"https://api.github.com/repos/minio/minio/releases{/id}","deployments_url":"https://api.github.com/repos/minio/minio/deployments","created_at":"2015-01-14T19:23:58Z","updated_at":"2018-11-13T23:53:13Z","pushed_at":"2018-11-13T23:53:07Z","git_url":"git://github.com/minio/minio.git","ssh_url":"git@github.com:minio/minio.git","clone_url":"https://github.com/minio/minio.git","svn_url":"https://github.com/minio/minio","homepage":"https://minio.io/downloads.html#download-server","size":43587,"stargazers_count":13535,"watchers_count":13535,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1230,"mirror_url":null,"archived":false,"open_issues_count":139,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1230,"open_issues":139,"watchers":13535,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minio/minio/pulls/6800"},"html":{"href":"https://github.com/minio/minio/pull/6800"},"issue":{"href":"https://api.github.com/repos/minio/minio/issues/6800"},"comments":{"href":"https://api.github.com/repos/minio/minio/issues/6800/comments"},"review_comments":{"href":"https://api.github.com/repos/minio/minio/pulls/6800/comments"},"review_comment":{"href":"https://api.github.com/repos/minio/minio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minio/minio/pulls/6800/commits"},"statuses":{"href":"https://api.github.com/repos/minio/minio/statuses/50b7b0a7378e17073a4de5081381c5ed68c836a3"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"krishnasrinivas"}}