aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/api_triggers.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-16 02:14:02 -0400
committerhistoria <[not public]>2026-09-16 02:14:02 -0400
commitad60843fbf577eda80105e3916822d663aaefcb3 (patch)
tree68092a6403fdb2992ef92cfe0e2dd62b479935aa /internal/admin/api_triggers.go
parent61881fd0c1a7066293f552be1a747143f70d03ff (diff)
downloadthehouseoficarus-ad60843fbf577eda80105e3916822d663aaefcb3.tar.gz
fix: economy recovery double-refund/erased-liability/cap-drops, entity editor path traversal
Diffstat (limited to 'internal/admin/api_triggers.go')
-rw-r--r--internal/admin/api_triggers.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/admin/api_triggers.go b/internal/admin/api_triggers.go
index 749f5a1..87eb82e 100644
--- a/internal/admin/api_triggers.go
+++ b/internal/admin/api_triggers.go
@@ -40,6 +40,10 @@ func (s *AdminServer) handleTriggers(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(m, "id")
kind := triggerKind(m)
@@ -74,6 +78,10 @@ func (s *AdminServer) handleTriggerByID(w http.ResponseWriter, r *http.Request)
http.Error(w, `{"error":"missing id"}`, http.StatusBadRequest)
return
}
+ if !validEntityID(id) {
+ http.Error(w, `{"error":"invalid id"}`, http.StatusBadRequest)
+ return
+ }
switch r.Method {
case http.MethodGet: