Apply security audit fixes
- Release a torched address's short id immediately, so create/torch churn can't exhaust the shared id pool for everyone (F-1) - Atomic conditional upsert for rate limits, closing the concurrent /new bypass of the limiter and address cap (F-2) - Telegram webhook always acknowledges, so a failed reply can't make Telegram redeliver and re-run a committed command (F-3) - mail.tm poller claims each message before handling it, isolates failures per message, caps source size, and shuffles mailbox order so one poison message can't wedge the cron (F-4, F-7) - Linear-time html-to-text and entity range check (F-5, F-10) - Escape Slack mrkdwn, validate link URLs, single-line headers (F-6) - Memoize /counters in the isolate (F-8) - Cap signed request bodies and add a Discord replay window (F-11, F-12) - Own-property rate-limit lookup (F-14), log short ids not addresses (F-22) - Per-platform reminder text and a per-run owner cap (L-1, L-2) - Handle slow mail.tm /new within the reply deadline (L-3) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
16 files changed+291−84
Rendering diff…