Found a race condition in the casino slots spin endpoint that bypasses the "one spin at a time" lock.
The slots spin lock uses a non-atomic check-then-set pattern. By sending multiple concurrent requests to the spin endpoint, 2-5 spins execute before the lock engages. The server returns "A slots spin is already in action" for the rest, but the ones that slip through are fully processed and charged.
How to Reproduce
1. Go to the Slots page
2. Open browser DevTools console (F12)
3. Paste and run:
const rfcv = document.match(/rfc_v=([a-f0-9]+)/)[1];
const promises = [];
for (let i = 0; i < 20; i++) {
promises.push(fetch('/page.php?sid=slotsData&step=play&stake=10000&rfcv=' + rfcv + '&_r=' + i, {
credentials: 'same-origin',
headers: { 'X-Requested-With': 'XMLHttpRequest', 'Referer': 'https://www.torn.com/page.php?sid=slots' }
}).then(r => r.json()));
}
const results = await Promise.all(promises);
console.log('Spins:', results.filter(r => r.won !== undefined).length, '/ Locked:', results.filter(r => r.error?.includes('already')).length);
Expected: 1 spin executes, 19 locked
Actual: 2-5 spins execute, 15-18 locked