diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index bdcdc6e97..76a874990 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -36,7 +36,7 @@ import ( // This regular expression is probably stricter than it needs to be. We can relax it // somewhat. Newline characters, as well as $, quotes, +, parens, and % are known to be // problematic. -var chartName = regexp.MustCompile("^[a-zA-Z0-9._-]+$") +var chartName = regexp.MustCompile("^[a-z0-9\\-]+$") const ( // ChartfileName is the default Chart file name. diff --git a/pkg/chartutil/create_test.go b/pkg/chartutil/create_test.go index 9a473fc59..852d7dd4e 100644 --- a/pkg/chartutil/create_test.go +++ b/pkg/chartutil/create_test.go @@ -160,8 +160,12 @@ func TestCreate_Overwrite(t *testing.T) { func TestValidateChartName(t *testing.T) { for name, shouldPass := range map[string]bool{ "": false, - "abcdefghijklmnopqrstuvwxyz-_.": true, - "ABCDEFGHIJKLMNOPQRSTUVWXYZ-_.": true, + "abcdefghijklmnopqrstuvwxyz-_.": false, + "ABCDEFGHIJKLMNOPQRSTUVWXYZ-_.": false, + "abcdefghijklmnopqrstuvwxyz": true, + "abcdefghijklmnopqrstuvwxyz_": false, + "abcdefghijklmnopqrstuvwxyz-": true, + "abcdefghijklmnopqrstuvwxyz.": false, "$hello": false, "HellĂ´": false, "he%%o": false,