We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97582e0 commit 2ce5707Copy full SHA for 2ce5707
pkg/cidata/template.go
@@ -11,6 +11,7 @@ import (
11
"github.com/lima-vm/lima/pkg/iso9660util"
12
13
"github.com/containerd/containerd/identifiers"
14
+ "github.com/lima-vm/lima/pkg/osutil"
15
"github.com/lima-vm/lima/pkg/textutil"
16
)
17
@@ -92,8 +93,8 @@ func ValidateTemplateArgs(args TemplateArgs) error {
92
93
if err := identifiers.Validate(args.Name); err != nil {
94
return err
95
}
- if err := identifiers.Validate(args.User); err != nil {
96
- return err
+ if !osutil.ValidateUsername(args.User) {
97
+ return errors.New("field User must be valid linux username")
98
99
if args.User == "root" {
100
return errors.New("field User must not be \"root\"")
0 commit comments