{"action":"created","comment":{"url":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/comments/259366029","pull_request_review_id":206849167,"id":259366029,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1OTM2NjAyOQ==","diff_hunk":"@@ -429,9 +429,16 @@ func (p *OAuthProxy) SetCSRFCookie(rw http.ResponseWriter, req *http.Request, va\n // ClearSessionCookie creates a cookie to unset the user's authentication cookie\n // stored in the user's session\n func (p *OAuthProxy) ClearSessionCookie(rw http.ResponseWriter, req *http.Request) {\n-\tcookies := p.MakeSessionCookie(req, \"\", time.Hour*-1, time.Now())\n-\tfor _, clr := range cookies {\n-\t\thttp.SetCookie(rw, clr)\n+\treqCookies := req.Cookies()\n+\tvar cookies []*http.Cookie\n+\n+\tfor _, c := range reqCookies {","path":"oauthproxy.go","position":10,"original_position":10,"commit_id":"dba2a3da02fead12a2009e65a2b197bb013d1497","original_commit_id":"978aa34ce333a797b64889e8be2dfb81a74a9b2c","user":{"login":"einfachchr","id":17160389,"node_id":"MDQ6VXNlcjE3MTYwMzg5","avatar_url":"https://avatars1.githubusercontent.com/u/17160389?v=4","gravatar_id":"","url":"https://api.github.com/users/einfachchr","html_url":"https://github.com/einfachchr","followers_url":"https://api.github.com/users/einfachchr/followers","following_url":"https://api.github.com/users/einfachchr/following{/other_user}","gists_url":"https://api.github.com/users/einfachchr/gists{/gist_id}","starred_url":"https://api.github.com/users/einfachchr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/einfachchr/subscriptions","organizations_url":"https://api.github.com/users/einfachchr/orgs","repos_url":"https://api.github.com/users/einfachchr/repos","events_url":"https://api.github.com/users/einfachchr/events{/privacy}","received_events_url":"https://api.github.com/users/einfachchr/received_events","type":"User","site_admin":false},"body":"Hm, I'm not sure what you're up to. I need the slice to support the \"ugly hack\"\r\n\r\n```\r\n\t// ugly hack because default domain changed\r\n\tif p.CookieDomain == \"\" && len(cookies) > 0 {\r\n\t\tclr2 := *cookies[0]\r\n\t\tclr2.Domain = req.Host\r\n\t\thttp.SetCookie(rw, &clr2)\r\n\t}\r\n```\r\nCould you provide some details in case I'm totally wrong?\r\n","created_at":"2019-02-22T14:35:43Z","updated_at":"2019-02-22T14:35:44Z","html_url":"https://github.com/pusher/oauth2_proxy/pull/70#discussion_r259366029","pull_request_url":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/70","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/comments/259366029"},"html":{"href":"https://github.com/pusher/oauth2_proxy/pull/70#discussion_r259366029"},"pull_request":{"href":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/70"}},"in_reply_to_id":259089616},"pull_request":{"url":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/70","id":255098040,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU1MDk4MDQw","html_url":"https://github.com/pusher/oauth2_proxy/pull/70","diff_url":"https://github.com/pusher/oauth2_proxy/pull/70.diff","patch_url":"https://github.com/pusher/oauth2_proxy/pull/70.patch","issue_url":"https://api.github.com/repos/pusher/oauth2_proxy/issues/70","number":70,"state":"open","locked":false,"title":"Fixes deletion of splitted cookies - Issue #69","user":{"login":"einfachchr","id":17160389,"node_id":"MDQ6VXNlcjE3MTYwMzg5","avatar_url":"https://avatars1.githubusercontent.com/u/17160389?v=4","gravatar_id":"","url":"https://api.github.com/users/einfachchr","html_url":"https://github.com/einfachchr","followers_url":"https://api.github.com/users/einfachchr/followers","following_url":"https://api.github.com/users/einfachchr/following{/other_user}","gists_url":"https://api.github.com/users/einfachchr/gists{/gist_id}","starred_url":"https://api.github.com/users/einfachchr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/einfachchr/subscriptions","organizations_url":"https://api.github.com/users/einfachchr/orgs","repos_url":"https://api.github.com/users/einfachchr/repos","events_url":"https://api.github.com/users/einfachchr/events{/privacy}","received_events_url":"https://api.github.com/users/einfachchr/received_events","type":"User","site_admin":false},"body":"This pull requests changes how the cookies are deleted on logout. It changes how the cookie names are\r\ndetermined.\r\n\r\nIf you have any questions / suggestions, I'd be glad to add these.\r\n\r\n## Description\r\n\r\nFor problem description see Issue #69. \r\n\r\nClearSessionCookie() is changed to search the request cookies for cookies set by this proxy (identified by \r\nname prefix). For each of these a \"reset cookie\" is generated and set into the response header.\r\n\r\nThe change only affects the way the cookie names are determined.\r\n\r\n## Motivation and Context\r\n\r\nFixes Issue #69. A user cannot be logged out in case of splitted cookies.\r\n\r\n## How Has This Been Tested?\r\n\r\nThis is tested by unit tests (oauthproxy_test.go - TestClearSplittedCookie, TestClearNotSplittedCookie)\r\nand this is running in our production environment.\r\n\r\n## Checklist:\r\n\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\r\n- [ ] My change requires a change to the documentation or CHANGELOG.\r\n- [ ] I have updated the documentation/CHANGELOG accordingly.\r\n- [x] I have created a feature (non-master) branch for my PR.\r\n","created_at":"2019-02-21T16:40:12Z","updated_at":"2019-02-22T14:35:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"580b728c5f2eb024966c8adeb7bd3077fb250b7e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/70/commits","review_comments_url":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/70/comments","review_comment_url":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pusher/oauth2_proxy/issues/70/comments","statuses_url":"https://api.github.com/repos/pusher/oauth2_proxy/statuses/dba2a3da02fead12a2009e65a2b197bb013d1497","head":{"label":"einfachchr:fix_splitted_cookies","ref":"fix_splitted_cookies","sha":"dba2a3da02fead12a2009e65a2b197bb013d1497","user":{"login":"einfachchr","id":17160389,"node_id":"MDQ6VXNlcjE3MTYwMzg5","avatar_url":"https://avatars1.githubusercontent.com/u/17160389?v=4","gravatar_id":"","url":"https://api.github.com/users/einfachchr","html_url":"https://github.com/einfachchr","followers_url":"https://api.github.com/users/einfachchr/followers","following_url":"https://api.github.com/users/einfachchr/following{/other_user}","gists_url":"https://api.github.com/users/einfachchr/gists{/gist_id}","starred_url":"https://api.github.com/users/einfachchr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/einfachchr/subscriptions","organizations_url":"https://api.github.com/users/einfachchr/orgs","repos_url":"https://api.github.com/users/einfachchr/repos","events_url":"https://api.github.com/users/einfachchr/events{/privacy}","received_events_url":"https://api.github.com/users/einfachchr/received_events","type":"User","site_admin":false},"repo":{"id":171898816,"node_id":"MDEwOlJlcG9zaXRvcnkxNzE4OTg4MTY=","name":"pusher_oauth2_proxy","full_name":"einfachchr/pusher_oauth2_proxy","private":false,"owner":{"login":"einfachchr","id":17160389,"node_id":"MDQ6VXNlcjE3MTYwMzg5","avatar_url":"https://avatars1.githubusercontent.com/u/17160389?v=4","gravatar_id":"","url":"https://api.github.com/users/einfachchr","html_url":"https://github.com/einfachchr","followers_url":"https://api.github.com/users/einfachchr/followers","following_url":"https://api.github.com/users/einfachchr/following{/other_user}","gists_url":"https://api.github.com/users/einfachchr/gists{/gist_id}","starred_url":"https://api.github.com/users/einfachchr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/einfachchr/subscriptions","organizations_url":"https://api.github.com/users/einfachchr/orgs","repos_url":"https://api.github.com/users/einfachchr/repos","events_url":"https://api.github.com/users/einfachchr/events{/privacy}","received_events_url":"https://api.github.com/users/einfachchr/received_events","type":"User","site_admin":false},"html_url":"https://github.com/einfachchr/pusher_oauth2_proxy","description":"A reverse proxy that provides authentication with Google, Github or other provider","fork":true,"url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy","forks_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/forks","keys_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/teams","hooks_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/hooks","issue_events_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/issues/events{/number}","events_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/events","assignees_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/assignees{/user}","branches_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/branches{/branch}","tags_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/tags","blobs_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/statuses/{sha}","languages_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/languages","stargazers_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/stargazers","contributors_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/contributors","subscribers_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/subscribers","subscription_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/subscription","commits_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/contents/{+path}","compare_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/merges","archive_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/downloads","issues_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/issues{/number}","pulls_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/pulls{/number}","milestones_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/milestones{/number}","notifications_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/labels{/name}","releases_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/releases{/id}","deployments_url":"https://api.github.com/repos/einfachchr/pusher_oauth2_proxy/deployments","created_at":"2019-02-21T15:41:01Z","updated_at":"2019-02-21T15:42:32Z","pushed_at":"2019-02-22T13:26:53Z","git_url":"git://github.com/einfachchr/pusher_oauth2_proxy.git","ssh_url":"git@github.com:einfachchr/pusher_oauth2_proxy.git","clone_url":"https://github.com/einfachchr/pusher_oauth2_proxy.git","svn_url":"https://github.com/einfachchr/pusher_oauth2_proxy","homepage":"","size":699,"stargazers_count":0,"watchers_count":0,"language":"Go","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pusher:master","ref":"master","sha":"c83335324e551e4d16f3838c0b570fc76416adf3","user":{"login":"pusher","id":739550,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczOTU1MA==","avatar_url":"https://avatars0.githubusercontent.com/u/739550?v=4","gravatar_id":"","url":"https://api.github.com/users/pusher","html_url":"https://github.com/pusher","followers_url":"https://api.github.com/users/pusher/followers","following_url":"https://api.github.com/users/pusher/following{/other_user}","gists_url":"https://api.github.com/users/pusher/gists{/gist_id}","starred_url":"https://api.github.com/users/pusher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pusher/subscriptions","organizations_url":"https://api.github.com/users/pusher/orgs","repos_url":"https://api.github.com/users/pusher/repos","events_url":"https://api.github.com/users/pusher/events{/privacy}","received_events_url":"https://api.github.com/users/pusher/received_events","type":"Organization","site_admin":false},"repo":{"id":105262714,"node_id":"MDEwOlJlcG9zaXRvcnkxMDUyNjI3MTQ=","name":"oauth2_proxy","full_name":"pusher/oauth2_proxy","private":false,"owner":{"login":"pusher","id":739550,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczOTU1MA==","avatar_url":"https://avatars0.githubusercontent.com/u/739550?v=4","gravatar_id":"","url":"https://api.github.com/users/pusher","html_url":"https://github.com/pusher","followers_url":"https://api.github.com/users/pusher/followers","following_url":"https://api.github.com/users/pusher/following{/other_user}","gists_url":"https://api.github.com/users/pusher/gists{/gist_id}","starred_url":"https://api.github.com/users/pusher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pusher/subscriptions","organizations_url":"https://api.github.com/users/pusher/orgs","repos_url":"https://api.github.com/users/pusher/repos","events_url":"https://api.github.com/users/pusher/events{/privacy}","received_events_url":"https://api.github.com/users/pusher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pusher/oauth2_proxy","description":"A reverse proxy that provides authentication with Google, Github or other provider","fork":false,"url":"https://api.github.com/repos/pusher/oauth2_proxy","forks_url":"https://api.github.com/repos/pusher/oauth2_proxy/forks","keys_url":"https://api.github.com/repos/pusher/oauth2_proxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pusher/oauth2_proxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pusher/oauth2_proxy/teams","hooks_url":"https://api.github.com/repos/pusher/oauth2_proxy/hooks","issue_events_url":"https://api.github.com/repos/pusher/oauth2_proxy/issues/events{/number}","events_url":"https://api.github.com/repos/pusher/oauth2_proxy/events","assignees_url":"https://api.github.com/repos/pusher/oauth2_proxy/assignees{/user}","branches_url":"https://api.github.com/repos/pusher/oauth2_proxy/branches{/branch}","tags_url":"https://api.github.com/repos/pusher/oauth2_proxy/tags","blobs_url":"https://api.github.com/repos/pusher/oauth2_proxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pusher/oauth2_proxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pusher/oauth2_proxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/pusher/oauth2_proxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pusher/oauth2_proxy/statuses/{sha}","languages_url":"https://api.github.com/repos/pusher/oauth2_proxy/languages","stargazers_url":"https://api.github.com/repos/pusher/oauth2_proxy/stargazers","contributors_url":"https://api.github.com/repos/pusher/oauth2_proxy/contributors","subscribers_url":"https://api.github.com/repos/pusher/oauth2_proxy/subscribers","subscription_url":"https://api.github.com/repos/pusher/oauth2_proxy/subscription","commits_url":"https://api.github.com/repos/pusher/oauth2_proxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/pusher/oauth2_proxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/pusher/oauth2_proxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/pusher/oauth2_proxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/pusher/oauth2_proxy/contents/{+path}","compare_url":"https://api.github.com/repos/pusher/oauth2_proxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pusher/oauth2_proxy/merges","archive_url":"https://api.github.com/repos/pusher/oauth2_proxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pusher/oauth2_proxy/downloads","issues_url":"https://api.github.com/repos/pusher/oauth2_proxy/issues{/number}","pulls_url":"https://api.github.com/repos/pusher/oauth2_proxy/pulls{/number}","milestones_url":"https://api.github.com/repos/pusher/oauth2_proxy/milestones{/number}","notifications_url":"https://api.github.com/repos/pusher/oauth2_proxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pusher/oauth2_proxy/labels{/name}","releases_url":"https://api.github.com/repos/pusher/oauth2_proxy/releases{/id}","deployments_url":"https://api.github.com/repos/pusher/oauth2_proxy/deployments","created_at":"2017-09-29T10:59:10Z","updated_at":"2019-02-22T07:50:01Z","pushed_at":"2019-02-22T14:10:53Z","git_url":"git://github.com/pusher/oauth2_proxy.git","ssh_url":"git@github.com:pusher/oauth2_proxy.git","clone_url":"https://github.com/pusher/oauth2_proxy.git","svn_url":"https://github.com/pusher/oauth2_proxy","homepage":"","size":699,"stargazers_count":285,"watchers_count":285,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":51,"mirror_url":null,"archived":false,"open_issues_count":32,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":51,"open_issues":32,"watchers":285,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/70"},"html":{"href":"https://github.com/pusher/oauth2_proxy/pull/70"},"issue":{"href":"https://api.github.com/repos/pusher/oauth2_proxy/issues/70"},"comments":{"href":"https://api.github.com/repos/pusher/oauth2_proxy/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pusher/oauth2_proxy/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/pusher/oauth2_proxy/statuses/dba2a3da02fead12a2009e65a2b197bb013d1497"}},"author_association":"NONE"}}
{"actor":{"display_login":"einfachchr"}}