security: LOW findings + fix .gitignore overmatch

- Swagger UI restricted to localhost only
- Message content length limit (4000 chars max) on create + update
- Bot/server/webhook ownership checks return 404 instead of 403
  (prevents resource ID enumeration)
- Fix .gitignore: /server instead of server to stop ignoring
  internal/server/ directory
This commit is contained in:
2026-06-29 09:41:44 -04:00
parent d25763cc84
commit 88756a72fa
7 changed files with 352 additions and 15 deletions
+1 -1
View File
@@ -310,7 +310,7 @@ func (h *CommandHandler) verifyBotOwnership(r *http.Request, userID, botID strin
return err
}
if ownerID != userID {
return errForbidden
return errNotFound
}
return nil
}