pull/9181/merge
Xiao Zhang 8 months ago committed by GitHub
commit b9cfc1f595
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -35,7 +35,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.

@ -147,8 +147,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,

Loading…
Cancel
Save