{"action":"created","comment":{"url":"https://api.github.com/repos/abbot/go-http-auth/pulls/comments/93815591","pull_request_review_id":14352123,"id":93815591,"diff_hunk":"@@ -31,3 +33,13 @@ func TestHtpasswdFile(t *testing.T) {\n \t\tt.Fatal(\"Got passwd for non-existant user:\", passwd)\n \t}\n }\n+\n+//To be used with go test -race\n+func TestConcurrent(t *testing.T) {\n+\tsecrets := HtpasswdFileProvider(\"test.htpasswd\")\n+\tos.Chtimes(\"test.htpasswd\", time.Now(), time.Now())\n+\tgo func() {\n+\t\tsecrets(\"test\", \"blah\")\n+\t}()\n+\tsecrets(\"test\", \"blah\")\n+}","path":"users_test.go","position":22,"original_position":22,"commit_id":"adc2b5a27d1d58cb6b86bacd99f188bf649a1a23","original_commit_id":"adc2b5a27d1d58cb6b86bacd99f188bf649a1a23","user":{"login":"abbot","id":5857,"avatar_url":"https://avatars.githubusercontent.com/u/5857?v=3","gravatar_id":"","url":"https://api.github.com/users/abbot","html_url":"https://github.com/abbot","followers_url":"https://api.github.com/users/abbot/followers","following_url":"https://api.github.com/users/abbot/following{/other_user}","gists_url":"https://api.github.com/users/abbot/gists{/gist_id}","starred_url":"https://api.github.com/users/abbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbot/subscriptions","organizations_url":"https://api.github.com/users/abbot/orgs","repos_url":"https://api.github.com/users/abbot/repos","events_url":"https://api.github.com/users/abbot/events{/privacy}","received_events_url":"https://api.github.com/users/abbot/received_events","type":"User","site_admin":false},"body":"Missing end of line?","created_at":"2016-12-24T10:34:13Z","updated_at":"2016-12-24T10:34:39Z","html_url":"https://github.com/abbot/go-http-auth/pull/43#discussion_r93815591","pull_request_url":"https://api.github.com/repos/abbot/go-http-auth/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/abbot/go-http-auth/pulls/comments/93815591"},"html":{"href":"https://github.com/abbot/go-http-auth/pull/43#discussion_r93815591"},"pull_request":{"href":"https://api.github.com/repos/abbot/go-http-auth/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/abbot/go-http-auth/pulls/43","id":99265672,"html_url":"https://github.com/abbot/go-http-auth/pull/43","diff_url":"https://github.com/abbot/go-http-auth/pull/43.diff","patch_url":"https://github.com/abbot/go-http-auth/pull/43.patch","issue_url":"https://api.github.com/repos/abbot/go-http-auth/issues/43","number":43,"state":"open","locked":false,"title":"Fixed concurrent map read and map write in default secret providers (issue crashes web server)","user":{"login":"vania-pooh","id":829320,"avatar_url":"https://avatars.githubusercontent.com/u/829320?v=3","gravatar_id":"","url":"https://api.github.com/users/vania-pooh","html_url":"https://github.com/vania-pooh","followers_url":"https://api.github.com/users/vania-pooh/followers","following_url":"https://api.github.com/users/vania-pooh/following{/other_user}","gists_url":"https://api.github.com/users/vania-pooh/gists{/gist_id}","starred_url":"https://api.github.com/users/vania-pooh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vania-pooh/subscriptions","organizations_url":"https://api.github.com/users/vania-pooh/orgs","repos_url":"https://api.github.com/users/vania-pooh/repos","events_url":"https://api.github.com/users/vania-pooh/events{/privacy}","received_events_url":"https://api.github.com/users/vania-pooh/received_events","type":"User","site_admin":false},"body":"Getting the following stacktrace when replacing htpasswd file during server run:\r\n```\r\nfatal error: concurrent map read and map write\r\n\r\ngoroutine 6472875 [running]:\r\nruntime.throw(0x6d07a9, 0x21)\r\n\t/usr/lib/go-1.7/src/runtime/panic.go:566 +0x95 fp=0xc420501ad0 sp=0xc420501ab0\r\nruntime.mapaccess2_faststr(0x67a560, 0xc4200a7980, 0xc4202e3040, 0x9, 0xc4202e3080, 0x2)\r\n\t/usr/lib/go-1.7/src/runtime/hashmap_fast.go:306 +0x52b fp=0xc420501b30 sp=0xc420501ad0\r\ngithub.com/abbot/go-http-auth.HtpasswdFileProvider.func2(0xc4202e3040, 0x9, 0x6cbc3b, 0x14, 0x2, 0xc4202e3080)\r\n\t/root/vania-pooh/go/src/github.com/abbot/go-http-auth/users.go:132 +0x67 fp=0xc420501b78 sp=0xc420501b30\r\ngithub.com/abbot/go-http-auth.(*BasicAuth).CheckAuth(0xc4203d3cc0, 0xc42010e1e0, 0xc4203deb70, 0xc4202a6030)\r\n\t/root/vania-pooh/go/src/github.com/abbot/go-http-auth/basic.go:83 +0x1ee fp=0xc420501c30 sp=0xc420501b78\r\ngithub.com/abbot/go-http-auth.(*BasicAuth).Wrap.func1(0x7eaf00, 0xc4204e8b60, 0xc42010e1e0)\r\n\t/root/vania-pooh/go/src/github.com/abbot/go-http-auth/basic.go:142 +0x46 fp=0xc420501c88 sp=0xc420501c30\r\nnet/http.HandlerFunc.ServeHTTP(0xc4203d3d60, 0x7eaf00, 0xc4204e8b60, 0xc42010e1e0)\r\n\t/usr/lib/go-1.7/src/net/http/server.go:1726 +0x44 fp=0xc420501cb0 sp=0xc420501c88\r\nnet/http.(*ServeMux).ServeHTTP(0xc42029a0c0, 0x7eaf00, 0xc4204e8b60, 0xc42010e1e0)\r\n\t/usr/lib/go-1.7/src/net/http/server.go:2022 +0x7f fp=0xc420501cf0 sp=0xc420501cb0\r\nnet/http.serverHandler.ServeHTTP(0xc42005e880, 0x7eaf00, 0xc4204e8b60, 0xc42010e1e0)\r\n\t/usr/lib/go-1.7/src/net/http/server.go:2202 +0x7d fp=0xc420501d38 sp=0xc420501cf0\r\nnet/http.(*conn).serve(0xc4200f5880, 0x7eb440, 0xc420184c00)\r\n\t/usr/lib/go-1.7/src/net/http/server.go:1579 +0x4b7 fp=0xc420501f98 sp=0xc420501d38\r\nruntime.goexit()\r\n\t/usr/lib/go-1.7/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc420501fa0 sp=0xc420501f98\r\ncreated by net/http.(*Server).Serve\r\n\t/usr/lib/go-1.7/src/net/http/server.go:2293 +0x44d\r\n```\r\nAdded RWLock where necessary.","created_at":"2016-12-23T17:27:25Z","updated_at":"2016-12-24T10:34:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd682ac4cb2ea275110228bc1ae4f098dbb68e02","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/abbot/go-http-auth/pulls/43/commits","review_comments_url":"https://api.github.com/repos/abbot/go-http-auth/pulls/43/comments","review_comment_url":"https://api.github.com/repos/abbot/go-http-auth/pulls/comments{/number}","comments_url":"https://api.github.com/repos/abbot/go-http-auth/issues/43/comments","statuses_url":"https://api.github.com/repos/abbot/go-http-auth/statuses/adc2b5a27d1d58cb6b86bacd99f188bf649a1a23","head":{"label":"vania-pooh:master","ref":"master","sha":"adc2b5a27d1d58cb6b86bacd99f188bf649a1a23","user":{"login":"vania-pooh","id":829320,"avatar_url":"https://avatars.githubusercontent.com/u/829320?v=3","gravatar_id":"","url":"https://api.github.com/users/vania-pooh","html_url":"https://github.com/vania-pooh","followers_url":"https://api.github.com/users/vania-pooh/followers","following_url":"https://api.github.com/users/vania-pooh/following{/other_user}","gists_url":"https://api.github.com/users/vania-pooh/gists{/gist_id}","starred_url":"https://api.github.com/users/vania-pooh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vania-pooh/subscriptions","organizations_url":"https://api.github.com/users/vania-pooh/orgs","repos_url":"https://api.github.com/users/vania-pooh/repos","events_url":"https://api.github.com/users/vania-pooh/events{/privacy}","received_events_url":"https://api.github.com/users/vania-pooh/received_events","type":"User","site_admin":false},"repo":{"id":77240240,"name":"go-http-auth","full_name":"vania-pooh/go-http-auth","owner":{"login":"vania-pooh","id":829320,"avatar_url":"https://avatars.githubusercontent.com/u/829320?v=3","gravatar_id":"","url":"https://api.github.com/users/vania-pooh","html_url":"https://github.com/vania-pooh","followers_url":"https://api.github.com/users/vania-pooh/followers","following_url":"https://api.github.com/users/vania-pooh/following{/other_user}","gists_url":"https://api.github.com/users/vania-pooh/gists{/gist_id}","starred_url":"https://api.github.com/users/vania-pooh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vania-pooh/subscriptions","organizations_url":"https://api.github.com/users/vania-pooh/orgs","repos_url":"https://api.github.com/users/vania-pooh/repos","events_url":"https://api.github.com/users/vania-pooh/events{/privacy}","received_events_url":"https://api.github.com/users/vania-pooh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vania-pooh/go-http-auth","description":"Basic and Digest HTTP Authentication for golang http","fork":true,"url":"https://api.github.com/repos/vania-pooh/go-http-auth","forks_url":"https://api.github.com/repos/vania-pooh/go-http-auth/forks","keys_url":"https://api.github.com/repos/vania-pooh/go-http-auth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vania-pooh/go-http-auth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vania-pooh/go-http-auth/teams","hooks_url":"https://api.github.com/repos/vania-pooh/go-http-auth/hooks","issue_events_url":"https://api.github.com/repos/vania-pooh/go-http-auth/issues/events{/number}","events_url":"https://api.github.com/repos/vania-pooh/go-http-auth/events","assignees_url":"https://api.github.com/repos/vania-pooh/go-http-auth/assignees{/user}","branches_url":"https://api.github.com/repos/vania-pooh/go-http-auth/branches{/branch}","tags_url":"https://api.github.com/repos/vania-pooh/go-http-auth/tags","blobs_url":"https://api.github.com/repos/vania-pooh/go-http-auth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vania-pooh/go-http-auth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vania-pooh/go-http-auth/git/refs{/sha}","trees_url":"https://api.github.com/repos/vania-pooh/go-http-auth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vania-pooh/go-http-auth/statuses/{sha}","languages_url":"https://api.github.com/repos/vania-pooh/go-http-auth/languages","stargazers_url":"https://api.github.com/repos/vania-pooh/go-http-auth/stargazers","contributors_url":"https://api.github.com/repos/vania-pooh/go-http-auth/contributors","subscribers_url":"https://api.github.com/repos/vania-pooh/go-http-auth/subscribers","subscription_url":"https://api.github.com/repos/vania-pooh/go-http-auth/subscription","commits_url":"https://api.github.com/repos/vania-pooh/go-http-auth/commits{/sha}","git_commits_url":"https://api.github.com/repos/vania-pooh/go-http-auth/git/commits{/sha}","comments_url":"https://api.github.com/repos/vania-pooh/go-http-auth/comments{/number}","issue_comment_url":"https://api.github.com/repos/vania-pooh/go-http-auth/issues/comments{/number}","contents_url":"https://api.github.com/repos/vania-pooh/go-http-auth/contents/{+path}","compare_url":"https://api.github.com/repos/vania-pooh/go-http-auth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vania-pooh/go-http-auth/merges","archive_url":"https://api.github.com/repos/vania-pooh/go-http-auth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vania-pooh/go-http-auth/downloads","issues_url":"https://api.github.com/repos/vania-pooh/go-http-auth/issues{/number}","pulls_url":"https://api.github.com/repos/vania-pooh/go-http-auth/pulls{/number}","milestones_url":"https://api.github.com/repos/vania-pooh/go-http-auth/milestones{/number}","notifications_url":"https://api.github.com/repos/vania-pooh/go-http-auth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vania-pooh/go-http-auth/labels{/name}","releases_url":"https://api.github.com/repos/vania-pooh/go-http-auth/releases{/id}","deployments_url":"https://api.github.com/repos/vania-pooh/go-http-auth/deployments","created_at":"2016-12-23T17:17:14Z","updated_at":"2016-12-23T17:17:17Z","pushed_at":"2016-12-24T09:29:47Z","git_url":"git://github.com/vania-pooh/go-http-auth.git","ssh_url":"git@github.com:vania-pooh/go-http-auth.git","clone_url":"https://github.com/vania-pooh/go-http-auth.git","svn_url":"https://github.com/vania-pooh/go-http-auth","homepage":"","size":46,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"abbot:master","ref":"master","sha":"cb4372376e1e00e9f6ab9ec142e029302c9e7140","user":{"login":"abbot","id":5857,"avatar_url":"https://avatars.githubusercontent.com/u/5857?v=3","gravatar_id":"","url":"https://api.github.com/users/abbot","html_url":"https://github.com/abbot","followers_url":"https://api.github.com/users/abbot/followers","following_url":"https://api.github.com/users/abbot/following{/other_user}","gists_url":"https://api.github.com/users/abbot/gists{/gist_id}","starred_url":"https://api.github.com/users/abbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbot/subscriptions","organizations_url":"https://api.github.com/users/abbot/orgs","repos_url":"https://api.github.com/users/abbot/repos","events_url":"https://api.github.com/users/abbot/events{/privacy}","received_events_url":"https://api.github.com/users/abbot/received_events","type":"User","site_admin":false},"repo":{"id":3832613,"name":"go-http-auth","full_name":"abbot/go-http-auth","owner":{"login":"abbot","id":5857,"avatar_url":"https://avatars.githubusercontent.com/u/5857?v=3","gravatar_id":"","url":"https://api.github.com/users/abbot","html_url":"https://github.com/abbot","followers_url":"https://api.github.com/users/abbot/followers","following_url":"https://api.github.com/users/abbot/following{/other_user}","gists_url":"https://api.github.com/users/abbot/gists{/gist_id}","starred_url":"https://api.github.com/users/abbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbot/subscriptions","organizations_url":"https://api.github.com/users/abbot/orgs","repos_url":"https://api.github.com/users/abbot/repos","events_url":"https://api.github.com/users/abbot/events{/privacy}","received_events_url":"https://api.github.com/users/abbot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abbot/go-http-auth","description":"Basic and Digest HTTP Authentication for golang http","fork":false,"url":"https://api.github.com/repos/abbot/go-http-auth","forks_url":"https://api.github.com/repos/abbot/go-http-auth/forks","keys_url":"https://api.github.com/repos/abbot/go-http-auth/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abbot/go-http-auth/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abbot/go-http-auth/teams","hooks_url":"https://api.github.com/repos/abbot/go-http-auth/hooks","issue_events_url":"https://api.github.com/repos/abbot/go-http-auth/issues/events{/number}","events_url":"https://api.github.com/repos/abbot/go-http-auth/events","assignees_url":"https://api.github.com/repos/abbot/go-http-auth/assignees{/user}","branches_url":"https://api.github.com/repos/abbot/go-http-auth/branches{/branch}","tags_url":"https://api.github.com/repos/abbot/go-http-auth/tags","blobs_url":"https://api.github.com/repos/abbot/go-http-auth/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abbot/go-http-auth/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abbot/go-http-auth/git/refs{/sha}","trees_url":"https://api.github.com/repos/abbot/go-http-auth/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abbot/go-http-auth/statuses/{sha}","languages_url":"https://api.github.com/repos/abbot/go-http-auth/languages","stargazers_url":"https://api.github.com/repos/abbot/go-http-auth/stargazers","contributors_url":"https://api.github.com/repos/abbot/go-http-auth/contributors","subscribers_url":"https://api.github.com/repos/abbot/go-http-auth/subscribers","subscription_url":"https://api.github.com/repos/abbot/go-http-auth/subscription","commits_url":"https://api.github.com/repos/abbot/go-http-auth/commits{/sha}","git_commits_url":"https://api.github.com/repos/abbot/go-http-auth/git/commits{/sha}","comments_url":"https://api.github.com/repos/abbot/go-http-auth/comments{/number}","issue_comment_url":"https://api.github.com/repos/abbot/go-http-auth/issues/comments{/number}","contents_url":"https://api.github.com/repos/abbot/go-http-auth/contents/{+path}","compare_url":"https://api.github.com/repos/abbot/go-http-auth/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abbot/go-http-auth/merges","archive_url":"https://api.github.com/repos/abbot/go-http-auth/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abbot/go-http-auth/downloads","issues_url":"https://api.github.com/repos/abbot/go-http-auth/issues{/number}","pulls_url":"https://api.github.com/repos/abbot/go-http-auth/pulls{/number}","milestones_url":"https://api.github.com/repos/abbot/go-http-auth/milestones{/number}","notifications_url":"https://api.github.com/repos/abbot/go-http-auth/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abbot/go-http-auth/labels{/name}","releases_url":"https://api.github.com/repos/abbot/go-http-auth/releases{/id}","deployments_url":"https://api.github.com/repos/abbot/go-http-auth/deployments","created_at":"2012-03-26T12:45:02Z","updated_at":"2016-12-20T04:26:51Z","pushed_at":"2016-12-24T09:29:49Z","git_url":"git://github.com/abbot/go-http-auth.git","ssh_url":"git@github.com:abbot/go-http-auth.git","clone_url":"https://github.com/abbot/go-http-auth.git","svn_url":"https://github.com/abbot/go-http-auth","homepage":"","size":73,"stargazers_count":274,"watchers_count":274,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":13,"forks":56,"open_issues":13,"watchers":274,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/abbot/go-http-auth/pulls/43"},"html":{"href":"https://github.com/abbot/go-http-auth/pull/43"},"issue":{"href":"https://api.github.com/repos/abbot/go-http-auth/issues/43"},"comments":{"href":"https://api.github.com/repos/abbot/go-http-auth/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/abbot/go-http-auth/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/abbot/go-http-auth/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/abbot/go-http-auth/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/abbot/go-http-auth/statuses/adc2b5a27d1d58cb6b86bacd99f188bf649a1a23"}}}}
{"actor":{"display_login":"abbot"}}