From 2bbc90e92ff140c29891e92c9ce320ca7d19cd57 Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Thu, 28 Nov 2013 12:24:04 -0800 Subject: [PATCH] Make volumes opts more strict --- opts.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opts.go b/opts.go index 826091bea6..80785a5161 100644 --- a/opts.go +++ b/opts.go @@ -100,6 +100,10 @@ func ValidateLink(val string) (string, error) { func ValidatePath(val string) (string, error) { var containerPath string + if strings.Count(val, ":") > 2 { + return val, fmt.Errorf("bad format for volumes: %s", val) + } + splited := strings.SplitN(val, ":", 2) if len(splited) == 1 { containerPath = splited[0]