Tester list also matches the IAP username

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-30 14:32:45 -05:00
parent ecfe97b90a
commit fad0767648
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ function allowed(claims, req) {
const s = ledger.settings(); const mode = String(process.env.DR_SIGNUPS || s.signups || 'testers');
if (mode === 'open') return true; if (mode === 'closed') return false;
const list = (s.testers || []).map(x => String(x).trim().toLowerCase()).filter(Boolean);
if (list.includes(String(claims.email || '').toLowerCase()) || list.includes(String(claims.memberId))) return true;
if (list.includes(String(claims.email || '').toLowerCase()) || list.includes(String(claims.memberId)) || (claims.username && list.includes(String(claims.username).toLowerCase()))) return true; // email, member id or IAP username
return mode === 'key' && req && hasPass(req);
}
// the IAP -> game callback is signed over the timestamp and the raw body with the shared secret