TritonDataCenter / node-docker-registry-client

node.js client for the docker registry
Mozilla Public License 2.0
64 stars 33 forks source link

Namespace validation too strict #23

Closed jzaefferer closed 7 years ago

jzaefferer commented 7 years ago

Similar to #16, GitLab also allows more characters in the namespace section, for example registry.gitlab.com/user.name/repo-name-a/repo-name-b (based on an actual (private) repo, anonymized).

That currently leads to errors like this: "invalid repository namespace, may only contain [a-z0-9_-] characters: user.name"

To address that, the VALID_NS regex would need to be extended, adding \. to the bracket expression: https://github.com/joyent/node-docker-registry-client/blob/b35b61e92c545d0d58b409ad7b87864265a2337a/lib/common.js#L36

I'm not familiar with tests in this repo, so if this change makes sense, I'd appreciate some hints for extending tests. If thats worth the effort.

trentm commented 7 years ago

Fixed in commit 16d3cbcf4c14aa42dd5269002a8f543ea96daa26 and published docker-registry-client@3.2.12.