Invite page: inline HTML escape (esc was not in scope)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -901,7 +901,7 @@ const server = http.createServer(async (req, res) => {
|
||||
// GET only shows a button: link-preview fetchers and in-app browsers prefetch links, and a prefetch must not spend the token
|
||||
if (req.method === 'GET') {
|
||||
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store', 'X-Robots-Tag': 'noindex' });
|
||||
return res.end('<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Sign in to LinkSpin</title></head><body style="margin:0;min-height:100vh;display:grid;place-items:center;background:#0B1424;font-family:Manrope,\'Segoe UI\',system-ui,sans-serif;color:#EEF3FA"><form method="post" style="background:#101D33;border:1px solid #1E2E4A;border-radius:12px;padding:28px 26px;width:min(420px,92vw);text-align:center"><div style="width:34px;height:34px;border-radius:50%;border:3px solid #1F6FEB;border-right-color:transparent;margin:0 auto 14px"></div><div style="font:700 11px monospace;letter-spacing:.14em;color:#8CA2C4">LINKSPIN TEST APP</div><h1 style="font:700 24px/1.2 \'Segoe UI\',system-ui;margin:8px 0 6px">Sign in as</h1><div style="font:500 14px monospace;color:#8CC8FF;margin-bottom:20px">' + esc(t.email) + '</div><button type="submit" style="font:700 15px \'Segoe UI\',system-ui;letter-spacing:.06em;text-transform:uppercase;background:linear-gradient(180deg,#FF7A32,#FF6A1A);color:#fff;border:1px solid #D9530A;border-radius:8px;padding:12px 22px;cursor:pointer;width:100%">Sign me in</button><p style="font-size:12px;color:#8CA2C4;margin:14px 0 0">One use. Good for 24 hours from when it was made.</p></form></body></html>');
|
||||
return res.end('<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Sign in to LinkSpin</title></head><body style="margin:0;min-height:100vh;display:grid;place-items:center;background:#0B1424;font-family:Manrope,\'Segoe UI\',system-ui,sans-serif;color:#EEF3FA"><form method="post" style="background:#101D33;border:1px solid #1E2E4A;border-radius:12px;padding:28px 26px;width:min(420px,92vw);text-align:center"><div style="width:34px;height:34px;border-radius:50%;border:3px solid #1F6FEB;border-right-color:transparent;margin:0 auto 14px"></div><div style="font:700 11px monospace;letter-spacing:.14em;color:#8CA2C4">LINKSPIN TEST APP</div><h1 style="font:700 24px/1.2 \'Segoe UI\',system-ui;margin:8px 0 6px">Sign in as</h1><div style="font:500 14px monospace;color:#8CC8FF;margin-bottom:20px">' + String(t.email).replace(/&/g, '&').replace(/</g, '<') + '</div><button type="submit" style="font:700 15px \'Segoe UI\',system-ui;letter-spacing:.06em;text-transform:uppercase;background:linear-gradient(180deg,#FF7A32,#FF6A1A);color:#fff;border:1px solid #D9530A;border-radius:8px;padding:12px 22px;cursor:pointer;width:100%">Sign me in</button><p style="font-size:12px;color:#8CA2C4;margin:14px 0 0">One use. Good for 24 hours from when it was made.</p></form></body></html>');
|
||||
}
|
||||
inviteTokens.delete(wm[1]);
|
||||
const acct = await accounts.byEmail(t.email); let memberId = 0; if (acct && acct.address) { try { memberId = await chain.memberIdByAccount(acct.address); } catch (e) {} }
|
||||
|
||||
Reference in New Issue
Block a user