mirror of
https://github.com/distribution/distribution.git
synced 2025-09-01 06:57:45 +00:00
Merge pull request #3818 from ckw017/ckw/fixseparatorregex
Fix separator regex to disallow empty strings
This commit is contained in:
@@ -50,7 +50,7 @@ const (
|
|||||||
// supporting repeated dash was added. Additionally double underscore is
|
// supporting repeated dash was added. Additionally double underscore is
|
||||||
// now allowed as a separator to loosen the restriction for previously
|
// now allowed as a separator to loosen the restriction for previously
|
||||||
// supported names.
|
// supported names.
|
||||||
separator = `(?:[._]|__|[-]*)`
|
separator = `(?:[._]|__|[-]+)`
|
||||||
|
|
||||||
// localhost is treated as a special value for domain-name. Any other
|
// localhost is treated as a special value for domain-name. Any other
|
||||||
// domain-name without a "." or a ":port" are considered a path component.
|
// domain-name without a "." or a ":port" are considered a path component.
|
||||||
|
Reference in New Issue
Block a user