Issue #1429 : Removing check for id string length

Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
This commit is contained in:
Harshal Patil 2017-05-04 09:03:19 +05:30
parent 992a5be178
commit 700c74cb7e
1 changed files with 2 additions and 7 deletions

View File

@ -27,10 +27,7 @@ const (
execFifoFilename = "exec.fifo" execFifoFilename = "exec.fifo"
) )
var ( var idRegex = regexp.MustCompile(`^[\w+-\.]+$`)
idRegex = regexp.MustCompile(`^[\w+-\.]+$`)
maxIdLen = 1024
)
// InitArgs returns an options func to configure a LinuxFactory with the // InitArgs returns an options func to configure a LinuxFactory with the
// provided init binary path and arguments. // provided init binary path and arguments.
@ -330,8 +327,6 @@ func (l *LinuxFactory) validateID(id string) error {
if !idRegex.MatchString(id) { if !idRegex.MatchString(id) {
return newGenericError(fmt.Errorf("invalid id format: %v", id), InvalidIdFormat) return newGenericError(fmt.Errorf("invalid id format: %v", id), InvalidIdFormat)
} }
if len(id) > maxIdLen {
return newGenericError(fmt.Errorf("invalid id format: %v", id), InvalidIdFormat)
}
return nil return nil
} }