diff options
| author | historia <[not public]> | 2026-09-16 02:14:02 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-16 02:14:02 -0400 |
| commit | ad60843fbf577eda80105e3916822d663aaefcb3 (patch) | |
| tree | 68092a6403fdb2992ef92cfe0e2dd62b479935aa /internal/admin/api_room_courses.go | |
| parent | 61881fd0c1a7066293f552be1a747143f70d03ff (diff) | |
| download | thehouseoficarus-ad60843fbf577eda80105e3916822d663aaefcb3.tar.gz | |
fix: economy recovery double-refund/erased-liability/cap-drops, entity editor path traversal
Diffstat (limited to 'internal/admin/api_room_courses.go')
| -rw-r--r-- | internal/admin/api_room_courses.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/admin/api_room_courses.go b/internal/admin/api_room_courses.go index 097b9e8..47e4d8c 100644 --- a/internal/admin/api_room_courses.go +++ b/internal/admin/api_room_courses.go @@ -153,6 +153,10 @@ func (s *AdminServer) handleCourses(w http.ResponseWriter, r *http.Request) { writeJSON(w, map[string]any{"error": "missing id"}) return } + if !validEntityID(id) { + writeJSON(w, map[string]any{"error": "invalid id"}) + return + } delete(body, "id") path := s.courseFilePath(id) if _, err := os.Stat(path); err == nil { @@ -186,6 +190,10 @@ func (s *AdminServer) handleCourseByID(w http.ResponseWriter, r *http.Request) { writeJSON(w, map[string]any{"error": "missing id"}) return } + if !validEntityID(id) { + writeJSON(w, map[string]any{"error": "invalid id"}) + return + } path := s.courseFilePath(id) switch r.Method { |
