namespaces: enforce a character set for namespaces

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day
2017-06-21 17:24:43 -07:00
parent 753f1a6c16
commit 5380585e21
6 changed files with 168 additions and 2 deletions

View File

@@ -21,6 +21,10 @@ func (s *namespaceStore) Create(ctx context.Context, namespace string, labels ma
return err
}
if err := namespaces.Validate(namespace); err != nil {
return err
}
// provides the already exists error.
bkt, err := topbkt.CreateBucket([]byte(namespace))
if err != nil {