diff options
Diffstat (limited to 'internal/admin/api_modules.go')
| -rw-r--r-- | internal/admin/api_modules.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/admin/api_modules.go b/internal/admin/api_modules.go index 1d8c25b..8356b2d 100644 --- a/internal/admin/api_modules.go +++ b/internal/admin/api_modules.go @@ -30,6 +30,10 @@ func (s *AdminServer) handleModules(w http.ResponseWriter, r *http.Request) { failJSON(w, "missing id") return } + if !validEntityID(id) { + failJSON(w, "invalid id") + return + } delete(m, "id") path := filepath.Join(s.dataDir, "modules", id+".yaml") if _, err := os.Stat(path); err == nil { |
