Traffic-exchange frames: framed pages open sign-in, Get a Position, My Team, wallet and off-site links in a new tab carrying ?ref=<sponsor>

Traffic exchanges, rotators and Massifly Adpoints show 5xyourteam.com inside another site's frame, where the browser drops the
SameSite=Lax fx.ref and fx.sid cookies, so signing in, buying or joining from the frame lost the sponsor (Marty 2026-11-19).
- common.js: framed (window.top !== window.self) -> /team, /join, /admin, /sso/ and off-site links get target=_blank
  rel=noopener (on load and again at click time); /team, /join and /sso/ links add ?ref= from the page's ?ref= (or ?r=), the
  coach page it is, or the cookie. The wallet buttons ([data-wallet-signin], Pay = [data-full-window]) open this page in a new
  tab with ?ref= instead of signing inside the frame. Public pages stay in the frame.
- server: /sso/start?...&ref=<name> sets fx.ref first-party and 302s to the plain start; /sso/* sends X-Frame-Options DENY
  (/team and /admin already did). Sponsor rules unchanged.
- coach.js marks the coach; join.js keeps Pay clickable when framed; asset tags bumped.
Checked with the fake traffic-exchange harness (cross-site frame, JS a.click()): 11/11 flows open a new tab with the sponsor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-19 07:21:13 -06:00
parent 214f348503
commit 47389a4169
23 changed files with 69 additions and 25 deletions
+3 -3
View File
@@ -28,15 +28,15 @@
<div class="potbox"><span class="lab">What you get</span><ul class="muted small" style="margin:0;padding-left:18px"><li>5 instant picks from this week's pool</li><li>A spot in every Monday draft, 5 rounds</li><li>Coaching tools: scouting stats, the steps, site messages, who to help first</li><li>A coach page and trading cards for your team</li><li>Up to 10 open picks at a time</li></ul></div></section>
<section id="jSign" class="panel" hidden><h3>Sign in first</h3><p class="muted small">The position goes to the wallet you are signed in with.</p><div id="jSignBox"></div></section>
<section class="panel dark"><h3 style="font-size:24px">Buy</h3><label class="small" for="jQty">How many positions</label><select id="jQty"></select><p class="muted" id="jPol"></p>
<div class="row"><button type="button" class="btn-gold" id="jBuy" disabled>Pay with my wallet</button></div><p id="status" class="note" hidden></p>
<div class="row"><button type="button" class="btn-gold" id="jBuy" data-full-window disabled>Pay with my wallet</button></div><p id="status" class="note" hidden></p>
<p class="small">Anything you send above the exact price comes back to you in the same transaction. Payments are final once confirmed.</p></section>
<section class="panel"><h3 style="font-size:24px">Where your $10 goes, in the same transaction</h3><div class="splitbar" id="splitbar"></div>
<p class="small">Your sponsor gets 25% and levels 2 to 5 of your network sponsor line get 5% each. Only people who hold a position can receive a share: anyone in your line who does not is passed over and the share goes up to the next person who does. 10% goes to the weekly Best Coach pot and 45% to 5xYourTeam. The contract keeps nothing. Check it on the <a href="/contract">contract page</a> and every payment on the <a href="/ledger">ledger</a>.</p>
<p class="small">A position buys a draft spot and coaching tools, not income. Nothing is promised.</p></section>
</main>
<script src="/assets/common.js?v=20261117z"></script>
<script src="/assets/common.js?v=20261119f"></script>
<script src="/assets/wallet.js?v=3"></script>
<script src="/assets/join.js?v=3"></script>
<script src="/assets/join.js?v=4"></script>
<script src="/assets/chat.js?v=2" defer></script>
</body>
</html>