mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Internal change.
PiperOrigin-RevId: 446281996
This commit is contained in:
@@ -50,7 +50,7 @@ const cgroupParentAnnotation = "dev.gvisor.spec.cgroup-parent"
|
||||
// validateID validates the container id.
|
||||
func validateID(id string) error {
|
||||
// See libcontainer/factory_linux.go.
|
||||
idRegex := regexp.MustCompile(`^[\w+-\.]+$`)
|
||||
idRegex := regexp.MustCompile(`^[\w+\.-]+$`)
|
||||
if !idRegex.MatchString(id) {
|
||||
return fmt.Errorf("invalid container id: %v", id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user