aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/server.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 15:42:23 -0400
committerhistoria <[not public]>2026-09-18 15:42:23 -0400
commit67e01aab85607b9e601185c7d62dff576af3bb43 (patch)
tree059134b2434eba7c14aa9d89f48c5a475feb0312 /internal/admin/server.go
parent7eab582d8a8ee2af1a6baae7baf0696c7005de2e (diff)
downloadthehouseoficarus-67e01aab85607b9e601185c7d62dff576af3bb43.tar.gz
fix: close map OOM, admin traversal, transport safespot, room rekey, and legacy payout recovery
Diffstat (limited to 'internal/admin/server.go')
-rw-r--r--internal/admin/server.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/admin/server.go b/internal/admin/server.go
index 4ea22d8..c13fe96 100644
--- a/internal/admin/server.go
+++ b/internal/admin/server.go
@@ -389,6 +389,12 @@ func (s *AdminServer) checkAuth(r *http.Request) bool {
return false
}
account := parts[0]
+ // The account name is attacker-controlled (it comes from the cookie) and
+ // is joined into players/accounts/<account>.yaml by isAdminAccount below,
+ // so reject path-like names before the first join.
+ if err := player.ValidName(account); err != nil {
+ return false
+ }
issued, err := strconv.ParseInt(parts[1], 10, 64)
if err != nil {
return false