{"action":"created","issue":{"url":"https://api.github.com/repos/docker/distribution/issues/233","labels_url":"https://api.github.com/repos/docker/distribution/issues/233/labels{/name}","comments_url":"https://api.github.com/repos/docker/distribution/issues/233/comments","events_url":"https://api.github.com/repos/docker/distribution/issues/233/events","html_url":"https://github.com/docker/distribution/pull/233","id":59763276,"number":233,"title":"digest: func Validate in digest doesn't filter no-hex data","user":{"login":"xiekeyang","id":9944031,"avatar_url":"https://avatars.githubusercontent.com/u/9944031?v=3","gravatar_id":"","url":"https://api.github.com/users/xiekeyang","html_url":"https://github.com/xiekeyang","followers_url":"https://api.github.com/users/xiekeyang/followers","following_url":"https://api.github.com/users/xiekeyang/following{/other_user}","gists_url":"https://api.github.com/users/xiekeyang/gists{/gist_id}","starred_url":"https://api.github.com/users/xiekeyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiekeyang/subscriptions","organizations_url":"https://api.github.com/users/xiekeyang/orgs","repos_url":"https://api.github.com/users/xiekeyang/repos","events_url":"https://api.github.com/users/xiekeyang/events{/privacy}","received_events_url":"https://api.github.com/users/xiekeyang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/distribution/labels/Bug","name":"Bug","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/distribution/milestones/3","html_url":"https://github.com/docker/distribution/milestones/Registry/RC","labels_url":"https://api.github.com/repos/docker/distribution/milestones/3/labels","id":924559,"number":3,"title":"Registry/RC","description":"Issues that are part of the first release candidate.","creator":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":3,"state":"open","created_at":"2015-01-06T22:00:58Z","updated_at":"2015-03-04T23:20:56Z","due_on":"2015-03-19T07:00:00Z","closed_at":null},"comments":2,"created_at":"2015-03-04T08:06:49Z","updated_at":"2015-03-05T01:13:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/distribution/pulls/233","html_url":"https://github.com/docker/distribution/pull/233","diff_url":"https://github.com/docker/distribution/pull/233.diff","patch_url":"https://github.com/docker/distribution/pull/233.patch"},"body":"old func Validate in digest seems not to validate when digest data isn't HEX format.\r\nAs it accepts the data string which is out of range of a-f0-9.\r\n@stevvooe @dmp42 ,\r\nPlease help take a view. Thanks a lot!"},"comment":{"url":"https://api.github.com/repos/docker/distribution/issues/comments/77286712","html_url":"https://github.com/docker/distribution/pull/233#issuecomment-77286712","issue_url":"https://api.github.com/repos/docker/distribution/issues/233","id":77286712,"user":{"login":"xiekeyang","id":9944031,"avatar_url":"https://avatars.githubusercontent.com/u/9944031?v=3","gravatar_id":"","url":"https://api.github.com/users/xiekeyang","html_url":"https://github.com/xiekeyang","followers_url":"https://api.github.com/users/xiekeyang/followers","following_url":"https://api.github.com/users/xiekeyang/following{/other_user}","gists_url":"https://api.github.com/users/xiekeyang/gists{/gist_id}","starred_url":"https://api.github.com/users/xiekeyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiekeyang/subscriptions","organizations_url":"https://api.github.com/users/xiekeyang/orgs","repos_url":"https://api.github.com/users/xiekeyang/repos","events_url":"https://api.github.com/users/xiekeyang/events{/privacy}","received_events_url":"https://api.github.com/users/xiekeyang/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T01:13:31Z","updated_at":"2015-03-05T01:13:31Z","body":"@stevvooe \r\nThanks for your explain. And I understand my mistake.\r\nCurrent code shows that,\r\n1. Upload blob data (digest=<tarsum>[&digest=sha256:<hex digest>]) is base64 type (must?);\r\n2. Digest Parameter (sha256:xxxxxxxx), described in spec, seems not through base64 decoding, and be HEX type (must?);\r\n3. DigestRegexp is likely for both Digest Parameter and blob data verification, in descriptors.go.\r\nIf is it right?\r\n\r\nThen, would you agree the proposal like that,\r\n1. New-define DigestParamRegexp for Digest Parameter. type of (tarsum)+sha256:<HEX type>;\r\n2. New-define DigestBlobRegexp,insteading DigestRegexp, for Upload blob data. type of base64 type;\r\n3. I recheck the code, and correct validation function(s), for both of above 2 objective;"}}