Network sign-in: a deliberate 'Sign in with InstantAdPay/LinkSpin' tap while signed out on the provider now asks for the provider's sign-in, then finishes the trip (/sso/resume), instead of bouncing back silently (Marty 2026-11-14: VBB sign-in did nothing)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-14 14:31:47 -06:00
parent 82eab8016b
commit 4ccdb914c7
6 changed files with 29 additions and 9 deletions
+2 -1
View File
@@ -142,7 +142,8 @@ try {
// a session that expired on the provider: the check answers none
ctx = await newCtx({ iap: 'f'.repeat(64) }); page = await ctx.newPage();
await page.goto(LS + '/sso/start?mode=go&to=%2Fads'); await page.waitForTimeout(1500);
ok(!(await meOf(ctx, LS)).signedIn && page.url() === LS + '/ads', 'an expired IAP session: the check answers none, normal sign-in');
ok(!(await meOf(ctx, LS)).signedIn && page.url().startsWith(IAP + '/my'), 'an expired IAP session on a deliberate tap: IAP asks for its own sign-in first (2026-11-14)', page.url());
ok((await ctx.cookies(IAP)).some(c => c.name === 'nsso.back'), 'IAP remembers the unfinished trip while the member signs in');
await ctx.close();
// 6. not on the receiving site yet: C (IAP only) going to LinkSpin, D (LinkSpin only) going to IAP
+1 -1
View File
@@ -82,7 +82,7 @@ const b64u = b => Buffer.from(b).toString('base64').replace(/=+$/, '').replace(/
r = await call(R('/sso/start?to=/my', 'nsso.off=1'));
ok(r.loc === '/my', 'after a sign-out here: no silent check');
r = await call(R('/sso/start?mode=go&to=/my', 'nsso.off=1'));
ok(/^https:\/\/ls\.example\/sso\/check\?st=[a-f0-9]{32}&to=%2Fmy$/.test(r.loc) && r.set.some(c => /^nsso\.off=;/.test(c)), 'a deliberate link from the other site still signs in after a sign-out (and lifts the 12-hour pause)');
ok(/^https:\/\/ls\.example\/sso\/check\?st=[a-f0-9]{32}&to=%2Fmy&m=go$/.test(r.loc) && r.set.some(c => /^nsso\.off=;/.test(c)), 'a deliberate link from the other site still signs in after a sign-out (and lifts the 12-hour pause)');
r = await call(R('/sso/start?to=https://evil.example'));
const stc = (r.set.find(c => c.startsWith('nsso.st=')) || '').split(';')[0].split('=')[1];
ok(/^[a-f0-9]{32}$/.test(stc) && r.set.some(c => /^nsso\.tried=1;.*Max-Age=1800/.test(c)) && r.set.every(c => /HttpOnly/.test(c) && /Secure/.test(c)) && r.loc.endsWith('&to=%2Fmy'), '/sso/start: HttpOnly state + 30-minute guard, off-site path replaced', r.loc);