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>
* send input
* remove message limiter
* write invoice into tx db
* do not delete tip twice
* hide link after 60 sedondw
* refactor button text update
* remove print
* translations enter user
* add tr
* no error on invalid user input
* printing fix
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* generalized amount started
* add new file
* uncomment old pay
* longer comments
* lnurl pay with generalized amount input
* generalized amount for /invoice
* amount input for all commands
* remove logging
* delete old comments
* anonymous user ID for lnurl
* anonymous lnurl
* migrate at every start, not good
* anon id at user creation
* migrations file
* fix database migration task
* remove comment
* anon label
Co-authored-by: lngohumble <lngohumble@gmail.com>
* add generalized bunt database transaction
* use bunt tx for inline faucet and send
* use bunt tx for inline receive
* use bunt tx for inline send
* use bunt tx for pay
* fix typo
* readd context
* add generalized bunt database transaction
* use bunt tx for inline faucet and send
* use bunt tx for inline receive
* use bunt tx for inline send
* use bunt tx for pay
* fix typo
* readd context
* some fixes
* tigher error checking
* add CreatedAt and UpdatedAt flags
* check error in GetTransaction
* add bunt transaction package and rename stuff
* use transaction.Base as function receiver for transaction functions
* add transaction.Base.Set function
* fix tiptooltip bunt index
* refactor
* auto update updated at
* refactor
* remove balance from error
* fix updated at
* faucet errors
* add generalized bunt database transaction
* use bunt tx for inline faucet and send
* use bunt tx for inline receive
* use bunt tx for inline send
* use bunt tx for pay
* fix typo
* readd context
* some fixes
* tigher error checking
* add generalized bunt database transaction
* use bunt tx for inline faucet and send
* use bunt tx for inline send
* add CreatedAt and UpdatedAt flags
* check error in GetTransaction
* add bunt transaction package and rename stuff
* use transaction.Base as function receiver for transaction functions
* add transaction.Base.Set function
* fix tiptooltip bunt index
* refactor
* auto update updated at
* fix updated at
* faucet errors
* refactor
* remove balance from error
* rebase fixes
* fix imports
* fix de string
* fix receive and send
* faucet language
* remove pay constructor
* release faucet
* remove redundant inTransaction
* remove constructor
* remove constructor
* transaction get pointer receiver
* send race condition
* inactivate in db
Co-authored-by: LightningTipBot <hWOofXvq4m@mail.com>
* add interceptor for handler context
* remove user load
* remove UserInitializedWallet
* remove getuser invocation
* add lnbits user to inlineFaucet
* set wallet client
* lnbits user to inline receive
* lnbits user to inline send
* add context to handleInlineReceiveQuery
* add handler.go
* fix help message
* fix handler registration
* rename
* check if reply to is nil
* remove unwanted stuff
* error handlers
* remove client from wallet
* rename force to require
* string fixes
* add intercept.Func
* add PrivateChat check
* remove private chat requirement for anytexthandler
* fix callback
* errors fixed
* fix callback
* loadUser
* do not require
* check type in interceptor
* check type in interceptor
* check for user wallets
* allow send for toUser with wallet but not initialized
* fix reply to context
* mdescape
* strfux
* set state columns only
* update str
* set user now
* anytext should not load user outside pm
* rename endpoint to donationEndpoint
* register uppercase endpoints and add comments
* fix photos in logMessageInterceptor
* reduce log level to trace
Co-authored-by: LightningTipBot <hWOofXvq4m@mail.com>