aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* register: cap account creation over Tor at five an hourAdam Soltys2 days1-0/+50
| | | | | | | | | | | | | | Onion clients all arrive from the Tor gateway's address, so the per-IP and per-range signup caps either let them create unlimited accounts or would count unrelated internal traffic. Mark requests that came through Tor (including ones the UI's server-side rendering relays, which forward the client address in cf-connecting-ip) with req.isTor, and give them one shared quota of five new accounts an hour for /register and first-time nostr logins. The recaptcha bypass for onion users now uses the same flag instead of trusting the Host header. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SSfVopM1ZzXKZmLYU
* lnurl: fetch user-supplied URLs through the SSRF guard, relay only protocol ↵Adam Soltys2026-11-131-0/+29
| | | | | | | | | | | | | 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]>
* ecash: redeem tokens by melting to the user's own invoiceAdam Soltys2026-09-161-1/+1
| | | | | | | | | | | Redeeming ecash is now a plain NUT-05 melt into a Lightning invoice owned by the redeeming user, credited by the regular lightning listener. Drop the house proof pool and its lock, the /mint and /melt routes, and the special-casing of a mint account in NWC and payment routing. Tokens are decoded against the mint's keyset list so short v1 ids resolve, and an empty keyset list is never cached. Co-Authored-By: Claude Fable 5.1 <[email protected]>
* nwc: enforce per-connection spend budgets + flag-gated incident containmentAdam Soltys2026-08-221-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | Thread the remaining allowance through every spend path (pay_invoice, pay, pay_keysend, internal transfer) as maxTotal, and have debit() assert the spend stays within it after it reloads the invoice and captures the tip — so a delegated NWC credential can no longer exceed its configured budget, and a mutated tip can't slip a small-budget check and drain via the internal path. checkBudget now returns the remaining allowance alongside any error; a blank budget is treated as deliberately unlimited and a positive budget requires a known renewal period. Add operator-controlled containment for a suspected credential disclosure, all gated behind Redis flags with no hardcoded scope: nwc:disabled fail every method closed nwc:credential-cutoff retire connections created before an epoch nwc:quarantined block an individual disclosed connection nwc:guard:dormant-keysend quarantine the first keysend on a long-idle app Fix an ownership check that read the bare pubkey instead of app:<pubkey>, which let an authenticated user overwrite another connection's config, and validate budget/fee/renewal inputs. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01XiwgmQKwKnRxUmVDd4xSf7
* test: regtest regression suite for the security-disclosure fixesAdam Soltys2026-08-071-0/+241
| | | | | | | | | | | 16 tests covering S1 (jwt.verify vs forged tokens), S2 (bcrypt cost 12 + legacy detection), S3 (adminpass fails closed on omitted/empty password), S5 (session cookie flags), S6 (atomic SET NX dedup), S7 (/upload auth), fnd-003/004 (memo truncation), fnd-006 (deleteSelf sub-account guard), and S8/fnd-007 (spend/cash mutex serialization). Black-box HTTP + redis against the live regtest stack; run with `bun run test:regtest`. Co-Authored-By: Claude Opus 4.8 <[email protected]>
* clean up unused filesAdam Soltys2018-03-151-4011/+0
|
* rename app to indexAdam Soltys2018-02-051-0/+4011
|
* Ditch client codeAdam Soltys2017-01-218-232/+0
|
* Initial VueificationAdam Soltys2017-01-158-0/+232