aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* funds: say "Funds have been discontinued" when refusing a fund actionAdam Soltys9 days1-1/+1
| | | | | Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6W9CsdxmhFrfaKNVHU
* funds: include archived and pre-rotation history in GET /fund/:idAdam Soltys9 days1-4/+20
| | | | | | | | | | | A fund's older payments live in the archive, and funds whose id was rotated keep that history under their previous id, so the fund page only showed the most recent entries. Merge the live and archived lists for both ids (fund:rotatedFrom:<id> maps a rotated fund back to its previous id) and sort newest first. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6W9CsdxmhFrfaKNVHU
* funds: serve fund history to anyone; close manager changesAdam Soltys10 days1-13/+14
| | | | | | | | | | Funds are closed and every value-moving route refuses, so a rotated fund's old id now resolves to its history for any viewer, read-only. Adding and removing managers is refused as well, so a fund without managers can't be claimed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6W9CsdxmhFrfaKNVHU
* mint: one pay per invoice hash, refuse MPP melts, gate a retired keysetAdam Soltys10 days2-11/+134
| | | | | | | | | | | meltguard refuses repeat and partial pays for a payment hash and can apply its cap as a rolling window. mintdemux refuses melt quotes with MPP or amountless options or an unparseable invoice, and only lets ecash from a gated keyset be spent if its DLEQ blinding factor traces it to an allowed mint operation. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SEnsbshZrUDtTsxAX
* nwc: floor the default routing fee cap at 5 satsAdam Soltys10 days1-2/+8
| | | | | | | | 1% rounds to zero below 50 sats, which rejected small zaps whose route costs a sat. Unused fee is refunded. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SEnsbshZrUDtTsxAX
* names: ignore registrar records held by blocked keysAdam Soltys10 days3-1/+40
| | | | | | | | | Names whose v3 record belongs to a key in names:blocked_holders are treated as unclaimed: lightning address, NIP-05 and legacy forwarding stay with the local account. Fails open if the registrar or db cannot answer. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SEnsbshZrUDtTsxAX
* remove the Shopify webhook integration; add a migration kill switchAdam Soltys10 days4-9/+6
| | | | | | | | | Drop the /shopify route and the shopify user fields. POST /user with `migrated` fails while migrate:disabled is set, which stops the UI migration hand-off before the registrar grant is issued. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SEnsbshZrUDtTsxAX
* webhooks, zaps: send user-supplied URLs through the SSRF guardAdam Soltys10 days4-23/+81
| | | | | | | | | | Invoice webhooks must be plain http(s) strings and are posted with safePost (checked, pinned address, no redirects). Zap requests resolve the recipient lud16/lud06 and callback through safeGot instead of fetching them as-is. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SEnsbshZrUDtTsxAX
* confirm: accept only canonical txids from the node notify scriptsAdam Soltys10 days2-1/+56
| | | | | | | | | | Lowercase and validate the txid so a mixed-case txid cannot slip past the case-sensitive dedupe keys, refuse requests that came through Cloudflare or the onion, and require the TCP peer to be a node container or loopback so internal relays cannot reach it either. Validate type and wallet. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SEnsbshZrUDtTsxAX
* payments: hold Lightning deposits back from on-chain withdrawalAdam Soltys10 days6-71/+501
| | | | | | | | | | | | | | | | While hold:enabled is set, Lightning deposits above a daily free allowance are held: they can still be spent over Lightning or sent internally, but not withdrawn on-chain or over Lightning into our own on-chain liquidity. The check and release run inside the atomic debit script, internal transfers carry the hold to the receiver, and old holds expire via scripts/holds.ts. The listener notes which peer each deposit arrived from for review. sendOnchain now refuses frozen accounts before building the transaction or locking its inputs, so a frozen account retrying withdrawals cannot hold hot-wallet UTXOs and make other sends fail with locked outputs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SEnsbshZrUDtTsxAX
* sendOnchain: grow the blocked-address list from mule accounts onlyAdam Soltys2026-11-131-1/+31
| | | | | | | | | | | An account caught sending to a blocked address is frozen and added to a `mules` set, and a mule's withdrawal destinations are blocked too, so a drain operator's fresh accounts are stopped on their first sweep. A plain blacklist freeze doesn't feed the list: frozen accounts are often takeover victims, and blocking their owner's own address locks the owner out after the account is recovered. Wallet-owned outputs (change) are never matched. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* ecash: answer a missing token with a plain errorAdam Soltys2026-11-131-1/+1
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* app: recognise onion requests that arrive through lbAdam Soltys2026-11-131-2/+10
| | | | | | | | | The onion service points at lb rather than the app, so the socket peer is lb and the tor check never matched; the client's own cf-connecting-ip and x-forwarded-for headers were trusted. Also check the last x-forwarded-for hop (which lb overwrites with its own peer) and pin the client IP to it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* lnurl: fetch user-supplied URLs through the SSRF guard, relay only protocol ↵Adam Soltys2026-11-137-10/+134
| | | | | | | | | | | | | fields Lightning address sends (pay() and POST /send/<lnaddr>) now validate the name and domain and fetch through safeGot instead of plain got. Zap receipt relays from the zap request must resolve to public hosts. The LNURL decode and proxy routes return only LNURL protocol fields instead of whatever JSON the upstream sent, and the proxy logs failures rate-limited with a generic error to the client. Also blocks the 172.42.0.0/16 docker range. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* v3forward: a registrar 404 means nobody holds the nameAdam Soltys2026-11-051-0/+7
| | | | | | | | The registrar answers 404 for a name that can't exist on v3, such as a legacy username with spaces. Treat it as unheld, and cache it like one, instead of logging a failed check on every receive. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* login: tell the client when an account's password was resetAdam Soltys2026-11-041-0/+11
| | | | | | | | | A rekeyed account holds the literal "reset" instead of a hash, so no password can match. Return "account reset" so the client can send the owner to support. The check runs after the captcha and the per-IP failure cap, and counts as a failure. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* changeid: carry the remaining uid-keyed lists to the new idAdam Soltys2026-11-041-0/+6
| | | | | Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6VN9xvnX1cgvV6hrUV
* self-delete: use the full delall sweep, require the PINAdam Soltys2026-11-042-79/+165
| | | | | | | | | | | POST /delete now runs lib/deluser, the same sweep as scripts/delall.ts: it also disables the account's bolt12 offers on the node, removes the invoice pointer keys (invoice:<hash|text|offer_id>), covers sub-account invoices and deletes from the archive too. Offers are disabled before any key is deleted, so an unreachable node aborts with the account intact. Accounts with a PIN must now send it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* users: ignore pubkey on signup, revoke a rekeyed account's nostr keyAdam Soltys2026-11-023-3/+24
| | | | | Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6VN9xvnX1cgvV6hrUV
* changeid: keep a frozen or evicted account frozen under its new idAdam Soltys2026-11-021-0/+5
| | | | | Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6VN9xvnX1cgvV6hrUV
* mintdemux: split restore requests by keyset between the old and new mintsAdam Soltys2026-11-021-2/+23
| | | | | Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6VN9xvnX1cgvV6hrUV
* payments: cap the routing fee a lightning send may reserveAdam Soltys2026-11-021-0/+11
| | | | | Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6VN9xvnX1cgvV6hrUV
* payments: credit each on-chain output once and require uuid invoice idsAdam Soltys2026-11-023-0/+27
| | | | | Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6VN9xvnX1cgvV6hrUV
* apps: require a hex NWC pubkey and return only public fields for payment usersAdam Soltys2026-10-291-1/+8
| | | | | | | | | The app pubkey names both the app record and its payment list, so a non-key value could point a connection at another account's payments. Reject anything but a 64-character hex key on create and lookup, and trim the user attached to each payment to the public profile fields. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* register: check the reCAPTCHA v3 score, action and hostname; cap signups per ↵Adam Soltys2026-10-292-8/+196
| | | | | | | | | | | | | | | network siteverify answers success for any validly minted v3 token, so success alone let scripted signups through. Signup now needs the register action and a 0.5 score, and login 0.3. A token minted for another site is refused. The web signup page must send a token. Signups are capped per IPv4 /16 or IPv6 /48, hourly and daily, and those keeping the auto-filled animal+NN username are capped site-wide per hour. Turnstile is verified and logged only, on trial. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NfM8zA4DdKvW1316z4zCaD
* payments: refuse a lightning send over the balance before quoting its routeAdam Soltys2026-10-291-1/+8
| | | | | | | | | A retrying client against an empty account cost an askrene query per attempt. debit() stays the authoritative check. Route-quote failures are also rate-limited in the log per user. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NfM8zA4DdKvW1316z4zCaD
* users: open pre-NIP-49 nostr keys with the account passwordAdam Soltys2026-10-293-5/+78
| | | | | | | | | Older accounts keep their nostr key as a password-encrypted seed (cipher + salt) rather than a NIP-49 nsec, so the reveal and signing paths treated them as having no key. On a verified password, /login and /nsec now convert it to a NIP-49 nsec, and hasnsec counts it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* lnquote: keep the quote layer until a timed-out getroutes is doneAdam Soltys2026-10-291-5/+24
| | | | | | | | | askrene queues getroutes calls beyond its child limit and only checks layer names when they arrive. Removing the quote layer after our RPC timeout left a queued request pointing at a missing layer, which trips an assert that takes lightningd down. Delay the removal when getroutes never answered. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docker: ghcr.io/coinos/bun, oven/bun with the distrusted emSign G3 root ↵Adam Soltys2026-10-212-21/+31
| | | | | | | | | swapped out bun-distrust.ts now carries the root's DER itself instead of finding it through tls.getCACertificates, so it works on any bun image. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* base: bun-distrust leaves the binary alone when there's nothing to replaceAdam Soltys2026-10-211-2/+4
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* base: take emSign ECC Root CA - G3 out of bun's built-in root storeAdam Soltys2026-10-212-0/+44
| | | | | | | | | | Bun compiles Mozilla's roots into its binary and NODE_USE_SYSTEM_CA only adds to them, so the fixed Debian ca-certificates doesn't reach fetch/tls. docker/bun-distrust.ts overwrites the root's DER in place with a same-length self-signed placeholder (key discarded) at image build time. Drop it once a bun release removes the root itself. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* base: bun 1.3.11 → 1.4.3Adam Soltys2026-10-211-1/+1
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* base: pin bun to 1.3.11 so rebuilding the image (fresh ca-certificates for ↵Adam Soltys2026-10-211-1/+3
| | | | | | the emSign CA compromise) doesn't also upgrade bun Co-Authored-By: Claude Opus 5.5 <[email protected]>
* users: let a password unlock the encrypted nostr key for any sessionAdam Soltys2026-10-132-0/+34
| | | | | | | | | | /me only reports hasnsec now, so sessions that didn't start with a password login had no way to reveal or sign with their key. POST /nsec returns it after re-checking the password, under the login per-IP failure limit. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UjHzoBmW1iPpEe5qC2LDYB
* login: drop the unused per-username failure counterAdam Soltys2026-10-131-7/+0
| | | | | | | | | The counter was incremented on every failed login and read but never acted on; the per-IP limits do the throttling. Its keys never expired and had grown to most of the keyspace. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UjHzoBmW1iPpEe5qC2LDYB
* bolt12: put the requested expiry and single-use on the offer itselfAdam Soltys2026-10-081-0/+9
| | | | | | | | The expiry was only stored on our invoice record, so CLN kept issuing invoices for the offer after it had expired. Pass it as absolute_expiry, and accept single_use to cap an offer at one payment. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* users: keep the encrypted nostr key and 2FA seed away from bearer tokensAdam Soltys2026-10-082-4/+15
| | | | | | | | /me and user emits return a hasnsec flag instead of the encrypted key, which is now only sent with a password login or registration. /otpsecret refuses once 2FA is enabled, and disabling 2FA rotates the seed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* analytics-geo: read rotated request log chunksAdam Soltys2026-10-081-6/+26
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Remove response loggerAdam Soltys2026-10-081-19/+0
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* me: stop reporting archived balance as locked for frozen accountsAdam Soltys2026-10-081-16/+1
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* lightningd: bump to v26.06.9Adam Soltys2026-10-071-1/+1
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* email: escape support form HTML and enforce recaptcha v3 scoreAdam Soltys2026-10-061-37/+56
| | | | | | | | Escape the message body, stop accepting a client-supplied subject, strip control characters from header values, require the expected action and a minimum score from siteverify, and drop the adminpass captcha bypass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* payments: lowercase payreq before looking up our own invoicesAdam Soltys2026-10-062-1/+12
| | | | | | | | | An uppercase bolt11 for a coinos invoice missed the getInvoice lookup, so it was paid over lightning to our own node instead of internally. The listener then saw the sender's payment pointer for that bolt11 and skipped crediting the recipient. Normalize in POST /payments and nwc pay_invoice. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* invoices: a supplied account must belong to the invoice's userAdam Soltys2026-10-061-1/+6
| | | | | | | | | | generate() took any existing account id as the credit target, so an invoice could carry one user's name while paying into someone else's account. A supplied aid now has to be in the invoice user's own account list; otherwise the invoice credits that user's main account. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KCxLg8s1g8yBwjRwPN4uJR
* Evicted accounts can't receive or log in; limit errors say what's happeningAdam Soltys2026-10-043-3/+18
| | | | | | | | | | | An evicted account no longer gets lightning-address invoices (stops a scam page's address from minting new ones) or a login token. A send over the server limit now says withdrawals are temporarily limited instead of a generic "Problem sending payment" that read as a frozen account. (Already live since the 2026-10-01 restart.) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011bvzKaZosXGHkigcGcSzAR
* v3 bridge: a migrated name's legacy receives are paid on to its v3 walletAdam Soltys2026-10-042-2/+147
| | | | | | | | | | | | | | | | | | A user who moved their name to coinos v3 keeps their legacy account, and old BOLT12 offers, bolt11 invoices and bitcoin/liquid deposit addresses keep paying into it. Each confirmed receive of those kinds is now forwarded as it lands to the name's v3 lightning address (registrar invoice on the ASP node; the v3 forwarder delivers to the Ark mailbox even with the wallet closed). Only new receives move; existing balances stay. Routing cost only: the platform fee is waived (debit exempt), and the direct channels to the ASP node quote 0. Proof required: the registrar holds the name for the legacy account's own key, or for the wallet its session named in a migration grant (/name granted flag). Autowithdraw stands down for forwarded receives; failures retry with backoff (v3fwd:retry, one process at a time) and otherwise stay put. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011bvzKaZosXGHkigcGcSzAR
* payments: refuse on-chain sends to blocked addresses before debitingAdam Soltys2026-09-291-0/+19
| | | | | | | | | debit() checks blocked_addresses against the payment hash, which for an on-chain send is the txid, so a blocked destination address was never matched. Check each output address of the built transaction in sendOnchain and fail before any debit. Co-Authored-By: Claude Fable 5.1 <[email protected]>
* lnurl: budget unauthenticated invoice generation per recipientAdam Soltys2026-09-291-5/+34
| | | | | | | | | | | | | GET /pay/:user/:amount and the lnurl callback create a CLN invoice and an entry in the recipient's invoice list for anyone holding the link, which a scanner on rotating IPs can do without tripping per-IP limits. Cap fresh invoices at 120 per recipient per hour (reused invoices don't count). Also fail cleanly for unknown usernames and skip invoice ids whose records no longer exist, instead of throwing on the null and breaking the pay page. Throttle the resulting lnurlp warnings per username. Co-Authored-By: Claude Fable 5.1 <[email protected]>
* logging: throttle log lines that clients can trigger at willAdam Soltys2026-09-294-11/+57
| | | | | | | | | | | | Evicted-JWT replays, blocked sends from frozen or limited accounts and failed payment retries each logged one line per request, so a looping client could flood the log, and an evicted token replayed across a proxy pool made atk-autoban.sh block every IP it saw. Add quiet()/suppressed() in lib/logging.ts: the first occurrence per key logs as before, repeats within the window are counted and reported on the next line that gets through. The evicted-auth summary line is worded so the auto-banner ignores it. Co-Authored-By: Claude Fable 5.1 <[email protected]>
* invoices: don't let a supplied id overwrite another user's invoiceAdam Soltys2026-09-292-0/+21
| | | | | | | | | | | | generate() writes invoice:<id> wholesale with the caller's uid, and the old bolt11 pointer keeps resolving to that id, so passing someone else's invoice id re-pointed their invoice at the caller's account. Invoice ids aren't secret (LUD-21 verify URLs, invoice pages, receipts), so refuse an existing id that belongs to a different user, both in generate() and in POST /invoice for anonymous pay-page callers. Both fail with "invoice not found" so ids can't be probed for existence. Co-Authored-By: Claude Fable 5.1 <[email protected]>