Skip to content

Commit

Permalink
Merge pull request #345 from Mashimiao/validate-add-namespace-path-check
Browse files Browse the repository at this point in the history
validate: add path check for namespace
  • Loading branch information
liangchenye authored Mar 21, 2017
2 parents ce55f9b + f0f5ebc commit 9f3942b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ func namespaceValid(ns rspec.Namespace) bool {
default:
return false
}

if ns.Path != "" && !filepath.IsAbs(ns.Path) {
return false
}

return true
}

Expand Down

0 comments on commit 9f3942b

Please sign in to comment.