Skip to content

Commit

Permalink
#495: make permissable names 64 characters long, rather than 50 - thi…
Browse files Browse the repository at this point in the history
…s makes anonymous docker volumes (which are randomly generated 64 character uuids) valid names, so that we can delete them
  • Loading branch information
lukemarsden committed Jul 10, 2018
1 parent 9efd757 commit 5478899
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/dotmesh-server/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ func NewDotmeshRPC(state *InMemoryState, um user.UserManager) *DotmeshRPC {
return &DotmeshRPC{state: state, usersManager: um}
}

var reNamespaceName = regexp.MustCompile(`^[a-zA-Z0-9_\-]{1,50}$`)
var reVolumeName = regexp.MustCompile(`^[a-zA-Z0-9_\-]{1,50}$`)
var reBranchName = regexp.MustCompile(`^[a-zA-Z0-9_\-]{1,50}$`)
var reSubdotName = regexp.MustCompile(`^[a-zA-Z0-9_\-]{1,50}$`)
var reNamespaceName = regexp.MustCompile(`^[a-zA-Z0-9_\-]{1,64}$`)
var reVolumeName = regexp.MustCompile(`^[a-zA-Z0-9_\-]{1,64}$`)
var reBranchName = regexp.MustCompile(`^[a-zA-Z0-9_\-]{1,64}$`)
var reSubdotName = regexp.MustCompile(`^[a-zA-Z0-9_\-]{1,64}$`)

func requireValidVolumeName(name VolumeName) error {
// Reject the request with an error if the volume name is invalid
Expand Down

0 comments on commit 5478899

Please sign in to comment.