7 Commits
Author SHA1 Message Date
Kevin RavensbergandMichilis 2c3c9fb3ce Only let the requesting user confirm an LNURL-auth login
The confirm handler signed the stored challenge with the key of whoever pressed the button. Check the owner like the cancel handler does.

(cherry picked from commit 547568cadcfd28d5ae94a1eb30f25dd0cfa03f91)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:33:45 +00:00
Kevin RavensbergandMichilis d1d51bbb16 Refuse transfers to placeholder users
Check the recipient where the money moves, so reaction tips, /send and inline sends to an existing placeholder wallet are covered too. The reply check in loadReplyToInterceptor is no longer needed and blocked /send with an explicit recipient.

(cherry picked from commit c8ea81d58aed2f288d0aee9fe63c3da08a97867c)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:33:45 +00:00
Kevin RavensbergandMichilis 8989483891 Ignore updates sent as a channel or anonymous admin
Telegram uses one shared fake user for all anonymous group admins and for messages sent as a channel. Such a sender must not own a wallet: reject its updates, do not tip it and do not create a wallet for it.

(cherry picked from commit 1b7478fc505b9ed388474192541185bc40569184)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:33:45 +00:00
Kevin RavensbergandMichilis 8d557f3043 Give every HTTP client its own transport
satdress.SetupHttpClient changes the TLS settings of the transport it gets from network.GetClient. With one shared transport that switched certificate checks off for all later LNURL requests.

(cherry picked from commit 864cc7b3e7d6b4cd9b57ae84b5d2646f8ba3177f)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:33:44 +00:00
Kevin RavensbergandMichilis 5360a9d4a1 Refuse more non-public address forms
Add the benchmarking, reserved, NAT64 and 6to4 ranges, and refuse numeric host names such as 2130706433 or 127.1 when a proxy resolves the name.

(cherry picked from commit a802a59627acdc6400ac2ecf19c8e5cbcc2868e8)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:33:44 +00:00
Kevin RavensbergandMichilis 5ff6e841e1 Refuse non-public addresses in the LNURL HTTP client
The clients from network.GetClient fetch URLs that come from users and from remote LNURL servers. Without a proxy they now only connect to public addresses. The check runs at connect time on the resolved address, so it also covers redirects and hostnames that resolve to an internal address. With a SOCKS proxy, literal internal addresses and localhost names are refused.

(cherry picked from commit c3bcae870ec6018e8809d96f86b0d091ab124a5a)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:33:44 +00:00
Kevin RavensbergandMichilis 34f2e562e2 Require a token for the admin API
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>
2026-11-13 20:33:44 +00:00