mirror of
https://github.com/jenkinsci/kubernetes-operator.git
synced 2026-10-19 17:40:52 +02:00
#144 Fix plugin name and version validation
This commit is contained in:
@@ -20,8 +20,8 @@ func (p Plugin) String() string {
|
||||
}
|
||||
|
||||
var (
|
||||
namePattern = regexp.MustCompile(`(?i)^[0-9a-z-_]+$`)
|
||||
versionPattern = regexp.MustCompile(`^[0-9\\.-]+(\..+)?$`)
|
||||
namePattern = regexp.MustCompile(`^[0-9a-zA-Z-_]+$`)
|
||||
versionPattern = regexp.MustCompile(`^[0-9a-zA-Z+\\.-]+$`)
|
||||
)
|
||||
|
||||
// New creates plugin from string, for example "name-of-plugin:0.0.1"
|
||||
|
||||
Reference in New Issue
Block a user