go run with the host's Go 1.21.6 reached 13 known net/http, crypto/tls
and crypto/x509 vulnerabilities, and golang.org/x/net was from 2021. The
module now asks for go1.26.11 through the toolchain directive (Go 1.21+
downloads it on first run) and uses x/net v0.62.0 and gorilla/websocket
v1.5.3. govulncheck is down to two findings in dependencies with no fix
(imroc/req v0.3.0, lnd v0.15 zpay32) that the bot's code paths do not
exercise.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The webhook listener accepted any POST as proof of payment and fired the
invoice callbacks (inline receive, group tickets, satdress payout, DALL-E
refund) for whatever payment hash the body named. It now:
- limits the body to 1 MB and only accepts a 64-hex payment hash,
- asks LNbits whether the named wallet really received a settled
incoming payment for that hash, and uses the amount LNbits reports,
- handles every payment hash once (bunt key "webhook:<hash>"),
- refuses to dispatch an invoice event registered for another wallet,
- runs the callback with a recover, so a panic can't take the bot down.
The pure checks live in internal/lnbits/webhook/verify, which does not
depend on the bot configuration and is unit tested.
Port of kravens/BitTipBot b7e56da and 27eb079 onto our simpler handler.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* speed up tx lock
* clean up
* refactor lnurl comment notification
* fix function name
* transaction: do not check balance; refactor invoice notifications
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>