diff --git a/qa/walk.mjs b/qa/walk.mjs index 9b0c212..28735ea 100644 --- a/qa/walk.mjs +++ b/qa/walk.mjs @@ -246,7 +246,8 @@ if (MODE === 'member' || MODE === 'all') { if (/QA internal note/.test(th)) note('bug', L + 'my#help', 'INTERNAL NOTE LEAKED to the member'); flush(bag, L + 'my#help (reply seen)'); console.log('ok member sees reply, no internal note'); } - // public /support (signed out): the form, the guard, the private ticket link + // public /support (signed out): the form, the guard, the private ticket link. Members only since 2026-10-24 (962cdf0): + // a signed-out ticket needs an email that has an account (qa-walk@example.com signed up above); others get a 403 { const pctx = await browser.newContext({ viewport: { width: 390, height: 844 }, isMobile: true }); await pctx.addInitScript(() => { try { sessionStorage.setItem('iap.welcome.v1', '1'); } catch (e) {} }); @@ -255,7 +256,7 @@ if (MODE === 'member' || MODE === 'all') { await domChecks(pp, L + '/support'); if (!(await pp.$('#supForm'))) note('bug', L + '/support', 'form did not render'); else { - await pp.fill('#supName', 'QA Visitor'); await pp.fill('#supEmail', 'qa-visitor@example.com'); + await pp.fill('#supName', 'QA Visitor'); await pp.fill('#supEmail', 'qa-walk@example.com'); await pp.fill('#supSubject', 'QA: cannot sign in'); await pp.fill('#supBody', 'The sign-in code never arrives. QA walk.'); await pp.click('#supSend'); await pp.waitForTimeout(3500); const tl = await pp.$eval('#supMain a.btn[href^="/support/t/"]', e => e.getAttribute('href')).catch(() => ''); @@ -268,7 +269,10 @@ if (MODE === 'member' || MODE === 'all') { const bad = await pp.request.get(LOCAL + '/api/support/t/' + tl.split('/').pop().slice(0, -4) + 'AAAA'); if (bad.status() !== 404) note('bug', L + '/support/t', 'a tampered token was accepted: ' + bad.status()); } - const bot = await pp.request.post(LOCAL + '/api/support', { data: { email: 'qa-bot@example.com', subject: 'x bot', body: 'bot body here', fts: Date.now(), fage: 10 } }); + const nm = await pp.request.post(LOCAL + '/api/support', { data: { email: 'qa-visitor@example.com', name: 'QA', subject: 'QA: not a member', category: 'Other', body: 'Not a member, should be refused.', fage: 9000 } }); + const nmj = await nm.json().catch(() => ({})); + if (nm.status() !== 403 || !nmj.membersOnly) note('bug', L + '/api/support', 'a non-member email was not refused (members-only): ' + nm.status()); + const bot = await pp.request.post(LOCAL + '/api/support', { data: { email: 'qa-walk@example.com', subject: 'x bot', body: 'bot body here', fts: Date.now(), fage: 10 } }); if (bot.status() !== 400) note('bug', L + '/api/support', 'instant (form-age 10ms) post was not refused: ' + bot.status()); } await pp.screenshot({ path: OUT + '/support-public.png' }).catch(() => {}); diff --git a/walletnudge.js b/walletnudge.js index 34792d6..58e682e 100644 --- a/walletnudge.js +++ b/walletnudge.js @@ -9,7 +9,7 @@ // account has a wallet that is an on-chain member (the same a.address the hand-off token carries) is PUSHED to that game's // signed POST /api/iap/wallet instead of nudged; the game's own payout sweep then pays it. Idempotent on the game side (the same // wallet twice is a no-op, a different one is refused), so the deploy overlap's two copies cannot do harm. -// nudge: false = push only (PolyBreak, SpellWheel, PolyWarriors joined 2026-10-25; their members never got nudge mail before). +// nudge: false = push only. PolyBreak, SpellWheel and PolyWarriors joined 2026-10-25 push-only; Marty turned their nudges on the same day. const fs = require('fs'), path = require('path'), crypto = require('crypto'), https = require('https'), http = require('http'); let R = {}, DATA_DIR = '.'; const FILE = () => path.join(DATA_DIR, 'wallet-nudge.json'); @@ -29,9 +29,9 @@ function games() { { key: 'clutterhunt', name: 'ClutterHunt', url: process.env.SEEK_URL, secret: process.env.SEEK_SSO_SECRET }, { key: 'driprunner', name: 'Drip Runner', url: process.env.DR_URL, secret: process.env.DR_SSO_SECRET }, { key: 'roadagent', name: 'Road Agent', url: process.env.RA_URL, secret: process.env.RA_SSO_SECRET }, - { key: 'polybreak', name: 'PolyBreak', url: process.env.PB_URL || 'https://polybreak.app', secret: process.env.PB_SSO_SECRET, nudge: false }, - { key: 'spellwheel', name: 'SpellWheel', url: process.env.SW_URL || 'https://spellwheel.com', secret: process.env.SW_SSO_SECRET, nudge: false }, - { key: 'polywarriors', name: 'PolyWarriors', url: process.env.PW_URL || 'https://polywarriors.com', secret: process.env.PW_SSO_SECRET, nudge: false } + { key: 'polybreak', name: 'PolyBreak', url: process.env.PB_URL || 'https://polybreak.app', secret: process.env.PB_SSO_SECRET }, + { key: 'spellwheel', name: 'SpellWheel', url: process.env.SW_URL || 'https://spellwheel.com', secret: process.env.SW_SSO_SECRET }, + { key: 'polywarriors', name: 'PolyWarriors', url: process.env.PW_URL || 'https://polywarriors.com', secret: process.env.PW_SSO_SECRET } ].filter(g => g.url && g.secret && String(g.secret).trim().length >= 32); } // POST the wallet to the game: X-IAP-Sig = hex HMAC-SHA256(secret, 'wallet\n' + ts + '\n' + hex sha256(body)) -> { status, j }