PolHunter mission prep (every rebuilt network site gets one, Marty 2026-11-14): the front page's How it works steps carry the PolHunter embed (data-selector ".steps .step", 3 slots); CSP admits https://polhunter.com in script-src and connect-src only. Hunters never count: a page with a ?ph= / #ph= token (or PolHunter's tab token in sessionStorage) asks /api/wire with hunt=1, and a visit from polhunter.com is treated the same, so no visit ticket is issued (no ad views, no Boost delivery, no verified-click token); daily counter huntVisits. Smoke 186/186.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -434,6 +434,16 @@ const mtop = await anon.json('/api/wire?page=member&u=topdog');
|
||||
ok(q2.ok && q2.linkspin === 'no-account' && m2.linkspin.state === 'no-account', 'no LinkSpin account for the username: the ad works with its own link', m2.linkspin); }
|
||||
{ const s2 = await anon.json('/api/admin/status', undefined, { 'x-admin-token': ADMIN }); ok(s2.linkspin && s2.linkspin.on === true && s2.linkspin.ensured >= 3 && s2.linkspin.failed >= 1 && !JSON.stringify(s2.linkspin).includes(SSO_SECRET), 'admin status: LinkSpin tracking counters, no secret', s2.linkspin); }
|
||||
|
||||
console.log('14c. PolHunter mission (front page, How it works)');
|
||||
{ const hr = await anon.req('/'); const hh = await hr.text(); const csp = hr.headers.get('content-security-policy') || '';
|
||||
ok(/<script src="https:\/\/polhunter\.com\/embed\.js" data-slots="3" data-selector="\.steps \.step" async><\/script>/.test(hh) && (hh.match(/class="step"/g) || []).length === 3, 'front page carries the PolHunter embed on the 3 How it works steps');
|
||||
ok(/script-src[^;]*https:\/\/polhunter\.com/.test(csp) && /connect-src[^;]*https:\/\/polhunter\.com/.test(csp), 'CSP admits polhunter.com in script-src and connect-src'); }
|
||||
{ const H = client(); const before = (await M1.json('/api/my')).ad.views;
|
||||
let w = await H.json('/api/wire?page=front&hunt=1'); ok(w._status === 200 && !w.ticket && w.hunt === true && w.ticker.length > 0, 'a hunter (hunt=1) gets the page but no visit ticket: never a verified view', { t: w.ticket, h: w.hunt });
|
||||
w = await H.json('/api/wire?page=front&src=' + encodeURIComponent('https://polhunter.com/app')); ok(!w.ticket && w.hunt === true, 'a visit from polhunter.com gets no ticket either');
|
||||
w = await H.json('/api/wire?page=member&u=owner&hunt=1'); ok(!w.ticket, 'hunt=1 on a member page: no ticket');
|
||||
const r9 = await H.json('/api/visit/seen', { ticket: 'f'.repeat(24), visibleMs: 9000 }); ok(r9.verified === false, 'no ticket, no verified visit');
|
||||
ok((await M1.json('/api/my')).ad.views === before, 'hunter visits add no views to any ad'); }
|
||||
await sleep(1000); // the store writes 800 ms after a change; a Windows kill has no SIGINT flush
|
||||
console.log('15. restart');
|
||||
await stop(); await boot(); await sleep(500);
|
||||
|
||||
Reference in New Issue
Block a user