- price map: guard with a RWMutex (fatal concurrent map access)
- InvoiceStream: stop on client disconnect, unsubscribe once, cap streams per wallet
- join tickets: key the ticket event per joiner; enforce tickets that
expired while the bot was down
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- /group ticket del: only the chat creator may remove a group registration
- /node: always dial user-supplied node hosts through the netguard client;
drop the https://127.0.0.1 prefix exemption
- /app/@{username}: accept only username characters, render the greeting as
text, add basic security headers
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The message interceptor logged every private text at Info, which put
bolt11 invoices, LNURLs, Cashu tokens and '/node add lnd <host>
<macaroon>' into journald. The API middleware logged the submitted key
of banned users. Both are redacted now.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
UpdateUserRecord wrote every column of the user it was given, so saving
a copy taken before a ban (cached user, stored inline object, invoice
event) lifted the ban. The banned flag and the admin key now always come
from the database row and are left out of the save; only the new
UpdateUserBan changes them, and the admin API uses it.
Manual port of kravens/BitTipBot 05c0a4e and dfc8d13.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The admin API (ban, unban, mutex, DALL-E toggles, pprof) had no authentication. Every request now needs 'Authorization: Bearer <bot.admin_api_token>'. Without a configured token all requests are rejected.
(cherry picked from commit 3fb544687d8cd8563f1e4e1720de1ef832653457)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>