From 64f510692cd53873cf9a95ac0a2bcd00a6a0e6be Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 27 Sep 2026 14:46:30 -0700 Subject: ecash: carry pasted tokens in the URL instead of storing them server-side The server no longer accepts anonymous token uploads. A pasted token now redirects straight to /ecash/, and the page asks the server for the token's status statelessly. Ids from previously shared links still resolve. Co-Authored-By: Claude Fable 5.1 --- src/lib/parse.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lib/parse.ts') diff --git a/src/lib/parse.ts b/src/lib/parse.ts index 663b2e42..e8d8bafd 100644 --- a/src/lib/parse.ts +++ b/src/lib/parse.ts @@ -105,10 +105,8 @@ export default async (s, host, cookies) => { .join(""); } - if (t.startsWith("cashu")) { - const { id } = await post("/cash", { token: t }); - redirect(307, `/ecash/${id}`); - } + // The token rides in the URL; the ecash page asks the server for its status. + if (t.startsWith("cashu")) redirect(307, `/ecash/${encodeURIComponent(t)}`); if (t.startsWith("creq")) redirect(307, `/send/ecash/${t}`); -- cgit v1.2.3