aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/build/build-node.sh
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-01 17:49:05 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-01 17:49:05 +0200
commit99eb93a00269fbfafba7536cf1613b3d4c18c3ce (patch)
tree20c51e5d4907f2d621edeb31b9a2a46bbac2ab33 /packaging/build/build-node.sh
parent9f95bf2deaec0c31e5fac95e1068db40b878e217 (diff)
downloadmeshbay-99eb93a00269fbfafba7536cf1613b3d4c18c3ce.tar.gz
fix(hub): require auth and distinct reporters for content reports
POST /v1/reports had no authentication and no rate limit, and counted every raw report row toward AUTO_BLOCK_THRESHOLD regardless of who sent it or from where — two anonymous requests naming any blake3 hash added it to the hub-wide content blocklist. A network-wide censorship and DoS primitive for anyone who learns a public file's hash. - require a signed-in account (get_current_user) - rate-limited (10/hour) - threshold now counts DISTINCT reporting accounts (reporter_id), one vote per account per hash; raised 2 -> 3 - refused outright (403) when the hub has public groups switched off: a private-only hub brokers no public content and nothing syncs the blocklist, so the endpoint would be pure abuse surface - admin blocklist management (/v1/admin/blocklist*) is untouched, so a manual block still works regardless of the public-groups setting Noted while fixing: no node currently consumes ContentBlocklist (swarm_register checks the separate CSAM list), so the network-wide block effect was latent — the abuse surface (DB fill, poisoned moderation signal) was live today. Tests rewritten in test_moderation.py. Third security review, finding H2. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011pG75yGK3NthNfyjH74omG
Diffstat (limited to 'packaging/build/build-node.sh')
0 files changed, 0 insertions, 0 deletions