feat(api): add spam/word filter for feedback submission
Per plan §13.6, implement a configurable spam filter for the
handleCreateFeedback endpoint that:
- Validates minimum content length (default 10 chars, configurable
via ACB_SPAM_MIN_LENGTH env var)
- Normalizes case and strips common unicode substitutions
(leetspeak: 0→o, 1→i, 3→e, 4→a, 5→s, 7→t, @→a, $→s, etc.)
- Checks content against a block-list of banned terms with word-boundary
matching
- Returns HTTP 422 (Unprocessable Entity) on filter rejection
Configuration:
- ACB_SPAM_BLOCK_LIST: comma-separated custom blocked terms (optional,
defaults to embedded list of common spam/offensive words)
- ACB_SPAM_MIN_LENGTH: minimum feedback content length (default: 10)
The embedded default block-list includes:
- Profanity and offensive language
- Common spam patterns (buy now, click here, free money, etc.)
- Scam patterns (bitcoin giveaway, urgent, act now, etc.)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>