{"action":"created","issue":{"url":"https://api.github.com/repos/verdaccio/verdaccio/issues/844","repository_url":"https://api.github.com/repos/verdaccio/verdaccio","labels_url":"https://api.github.com/repos/verdaccio/verdaccio/issues/844/labels{/name}","comments_url":"https://api.github.com/repos/verdaccio/verdaccio/issues/844/comments","events_url":"https://api.github.com/repos/verdaccio/verdaccio/issues/844/events","html_url":"https://github.com/verdaccio/verdaccio/issues/844","id":344001276,"node_id":"MDU6SXNzdWUzNDQwMDEyNzY=","number":844,"title":"TypeError: Cannot read property 'some' of undefined","user":{"login":"MichielDeMey","id":793406,"node_id":"MDQ6VXNlcjc5MzQwNg==","avatar_url":"https://avatars1.githubusercontent.com/u/793406?v=4","gravatar_id":"","url":"https://api.github.com/users/MichielDeMey","html_url":"https://github.com/MichielDeMey","followers_url":"https://api.github.com/users/MichielDeMey/followers","following_url":"https://api.github.com/users/MichielDeMey/following{/other_user}","gists_url":"https://api.github.com/users/MichielDeMey/gists{/gist_id}","starred_url":"https://api.github.com/users/MichielDeMey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichielDeMey/subscriptions","organizations_url":"https://api.github.com/users/MichielDeMey/orgs","repos_url":"https://api.github.com/users/MichielDeMey/repos","events_url":"https://api.github.com/users/MichielDeMey/events{/privacy}","received_events_url":"https://api.github.com/users/MichielDeMey/received_events","type":"User","site_admin":false},"labels":[{"id":926273105,"node_id":"MDU6TGFiZWw5MjYyNzMxMDU=","url":"https://api.github.com/repos/verdaccio/verdaccio/labels/High%20Priority","name":"High Priority","color":"961b15","default":false},{"id":358778390,"node_id":"MDU6TGFiZWwzNTg3NzgzOTA=","url":"https://api.github.com/repos/verdaccio/verdaccio/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"ayusharma","id":6918450,"node_id":"MDQ6VXNlcjY5MTg0NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6918450?v=4","gravatar_id":"","url":"https://api.github.com/users/ayusharma","html_url":"https://github.com/ayusharma","followers_url":"https://api.github.com/users/ayusharma/followers","following_url":"https://api.github.com/users/ayusharma/following{/other_user}","gists_url":"https://api.github.com/users/ayusharma/gists{/gist_id}","starred_url":"https://api.github.com/users/ayusharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayusharma/subscriptions","organizations_url":"https://api.github.com/users/ayusharma/orgs","repos_url":"https://api.github.com/users/ayusharma/repos","events_url":"https://api.github.com/users/ayusharma/events{/privacy}","received_events_url":"https://api.github.com/users/ayusharma/received_events","type":"User","site_admin":false},"assignees":[{"login":"ayusharma","id":6918450,"node_id":"MDQ6VXNlcjY5MTg0NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6918450?v=4","gravatar_id":"","url":"https://api.github.com/users/ayusharma","html_url":"https://github.com/ayusharma","followers_url":"https://api.github.com/users/ayusharma/followers","following_url":"https://api.github.com/users/ayusharma/following{/other_user}","gists_url":"https://api.github.com/users/ayusharma/gists{/gist_id}","starred_url":"https://api.github.com/users/ayusharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayusharma/subscriptions","organizations_url":"https://api.github.com/users/ayusharma/orgs","repos_url":"https://api.github.com/users/ayusharma/repos","events_url":"https://api.github.com/users/ayusharma/events{/privacy}","received_events_url":"https://api.github.com/users/ayusharma/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-07-24T11:44:39Z","updated_at":"2018-07-25T12:32:26Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Describe the bug**\r\nUsing `verdaccio-htpasswd`, the following error throws when trying to publish an NPM package.\r\n\r\n```\r\nTypeError: Cannot read property 'some' of undefined\r\n```\r\n\r\nNote: authenticating with the registry does work.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Mount a `htpasswd` file\r\n2. Authenticate with the registry\r\n3. Push an NPM package\r\n4. See error (500 Internal Server Error)\r\n\r\n**Expected behavior**\r\nPublishing a package should not throw a 500 Internal Server Error\r\n\r\n**Docker && Kubernetes:**\r\n - Docker verdaccio tag: verdaccio:beta\r\n\r\n**Configuration File (cat ~/.config/verdaccio/config.yaml)** \r\n```\r\n...\r\nauth:\r\n    htpasswd:\r\n      file: /auth/htpasswd\r\n      max_users: -1\r\n\r\npackages:\r\n    '@*/*':\r\n      access: $all\r\n      publish: $authenticated\r\n      proxy: npmjs\r\n...\r\n```\r\n\r\n**Debugging output**\r\n ```\r\ninfo &lt;-- 10.117.12.3 requested 'PUT /poppy-sftp'\r\n info --- basic authentication is deprecated, please use JWT instead\r\n error--- unexpected error: Cannot read property 'some' of undefined\r\nTypeError: Cannot read property 'some' of undefined\r\n    at Object.allow_publish (/usr/local/app/build/lib/auth-utils.js:16:39)\r\n    at next (/usr/local/app/build/lib/auth.js:165:14)\r\n    at next (/usr/local/app/build/lib/auth.js:162:16)\r\n    at Auth.allow_publish (/usr/local/app/build/lib/auth.js:175:7)\r\n    at /usr/local/app/build/api/middleware.js:125:30\r\n    at Layer.handle [as handle_request] (/usr/local/app/node_modules/express/lib/router/layer.js:95:5)\r\n    at next (/usr/local/app/node_modules/express/lib/router/route.js:137:13)\r\n    at Route.dispatch (/usr/local/app/node_modules/express/lib/router/route.js:112:3)\r\n    at Layer.handle [as handle_request] (/usr/local/app/node_modules/express/lib/router/layer.js:95:5)\r\n    at /usr/local/app/node_modules/express/lib/router/index.js:281:22\r\n http &lt;-- 500, user: michiel(84.198.87.116, 35.241.10.246 via 10.117.12.3), req: 'PUT /poppy-sftp', error: internal server error\r\n```\r\n**Additional context**\r\nI believe this is caused because the `verdaccio-htpasswd` package has not yet been updated for the refactor introduced in https://github.com/verdaccio/verdaccio/pull/800 and the function `allow_publish` is missing.\r\n\r\nLink to the line causing the issue: https://github.com/verdaccio/verdaccio/pull/800/files#diff-27264c6d2e54aef927237fa20c7e08efR7"},"comment":{"url":"https://api.github.com/repos/verdaccio/verdaccio/issues/comments/407738447","html_url":"https://github.com/verdaccio/verdaccio/issues/844#issuecomment-407738447","issue_url":"https://api.github.com/repos/verdaccio/verdaccio/issues/844","id":407738447,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzczODQ0Nw==","user":{"login":"juanpicado","id":558752,"node_id":"MDQ6VXNlcjU1ODc1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/558752?v=4","gravatar_id":"","url":"https://api.github.com/users/juanpicado","html_url":"https://github.com/juanpicado","followers_url":"https://api.github.com/users/juanpicado/followers","following_url":"https://api.github.com/users/juanpicado/following{/other_user}","gists_url":"https://api.github.com/users/juanpicado/gists{/gist_id}","starred_url":"https://api.github.com/users/juanpicado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanpicado/subscriptions","organizations_url":"https://api.github.com/users/juanpicado/orgs","repos_url":"https://api.github.com/users/juanpicado/repos","events_url":"https://api.github.com/users/juanpicado/events{/privacy}","received_events_url":"https://api.github.com/users/juanpicado/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T12:32:26Z","updated_at":"2018-07-25T12:32:26Z","author_association":"MEMBER","body":"@MichielDeMey we have tried to reproduce it but we could not. "}}
{"actor":{"display_login":"juanpicado"}}