mirror of
https://github.com/distribution/distribution.git
synced 2025-09-24 12:37:00 +00:00
Use correct regexp in reference.WithTag
This was using a different regexp from the intended one. This meant that tags with uppercase characters were not accepted. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
@@ -213,7 +213,7 @@ func WithName(name string) (Named, error) {
|
||||
// WithTag combines the name from "name" and the tag from "tag" to form a
|
||||
// reference incorporating both the name and the tag.
|
||||
func WithTag(name Named, tag string) (NamedTagged, error) {
|
||||
if !anchoredNameRegexp.MatchString(tag) {
|
||||
if !anchoredTagRegexp.MatchString(tag) {
|
||||
return nil, ErrTagInvalidFormat
|
||||
}
|
||||
return taggedReference{
|
||||
|
Reference in New Issue
Block a user