Tester list also matches the IAP username
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -37,7 +37,7 @@
|
||||
<div><label>Drip magnet (drips)</label><input name="item_magnet" type="number" step="1" min="0"></div>
|
||||
<div><label>Courier Mk II (drips)</label><input name="item_ship" type="number" step="1" min="0"></div>
|
||||
</div>
|
||||
<label>Testers (one per line: IAP email or member id)</label>
|
||||
<label>Testers (one per line: IAP username, email or member id)</label>
|
||||
<textarea name="testers" rows="6"></textarea>
|
||||
<p style="margin-top:10px"><button class="btn" type="submit">Save settings</button> <span class="muted" id="saveOut"></span></p>
|
||||
</form>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user