A security audit before launch
22 to 23 Nov 2026
- A read-only audit of the site’s server code found 0 critical, 0 high, 4 medium and 5 low problems, and 1 note.
- The first round was 7 patches, each with a test that fails on the old code before the fix went in.
- An independent reviewer broke the first fixes 8 ways, 2 of them medium. The final round was 9 patches, and money and sign-in changes now always get such a reviewer.
Our own tests passed on the first fixes; the reviewer found the gaps by trying orders of events the author had not thought of.
Before opening the game to more people we audited the site’s server code. The site holds real money (gem packs and Plus, paid through Stripe), real trades, and children’s accounts, and nobody had read the whole server for security in one pass. The measures as they are today are on the wiki page Security. This post leaves out how each problem could have been used beyond what is needed to understand the fix.
How the audit ran
- A read-only audit. One agent read the server code and wrote findings without changing anything: where, what an attacker would gain, and the smallest fix. It also wrote down what it checked and found sound and what it did not check, so the list of gaps is part of the result.
- Fixes one finding at a time, each its own patch with a test written first that fails on the old code. Each fix’s note says what it guarantees, so the next step has something to attack.
- An independent reviewer, who did not write the fixes, told to break them and not to write any fix. It ran scripts against the real code with a stand-in for Stripe, and wrote the failing test each break needed.
The four medium findings
- A sign-in link for the desktop app could hand a session to whoever made the link. The confirmation code is now never sent to the browser: the app shows it and you type it, and five wrong tries end the code.
- Deleting an account did not stop Plus billing. Deletion now cancels Plus first, and if Stripe cannot be reached the account is not deleted.
- The site could be shown inside another page, with no security headers. Every answer now refuses framing and sets the usual headers.
- Gem gifts skipped the 30-day hold that trades and the market already had for gems bought recently, which is there so a reversed card payment can be taken back. Gifts now follow the same hold.
The five low findings: writes relied on one cookie setting alone (now an origin check too), the free leaves a day followed a time zone the player could change (now a 24-hour window), account numbers looked reusable after deletion (the live code already prevented it; a test now guards it), sessions never expire on the server, and skipping the age question gives adult limits. The note: nothing in the code switches ranked rules off as a whole.
What the reviewer broke
The reviewer broke the first fixes 8 ways, each with a script and a failing test.
- Medium: the cancel request sent to Stripe used the same request key for every deletion of an account. Stripe replays the old answer for a repeated key for 24 hours, so a second deletion on the same day, after an undo and a renewal, looked successful and left Plus billing. Each deletion now has its own key, and the answer is checked.
- Medium: Plus could be bought during the 7 days a deletion can still be undone, and that subscription was never cancelled. The store now refuses checkouts while a deletion is pending, and the final removal cancels again.
- Low: undoing a deletion left Plus set to end. The undo now turns back on exactly what the deletion set to end.
- Low to medium: game items and profile gifts paid with gems, and Plus members’ monthly gems, skipped the gift hold. One hold-aware spending step now covers every gem gift.
- Low to medium: the forum is served ahead of the place where the origin check ran. The check now runs in front of the forum too.
- Low: a game socket upgrade carrying the session cookie did not check its origin. It does now. The game servers never see the cookie; they admit players by a signed ticket.
- Low: the desktop sign-in page could still be used to talk someone into typing a code. It now warns when the request came from another network, and the limit on tries is per code and per account.
What held: the payment webhook checks, one-use sign-in codes and their try limit, gift and market purchases (each one atomic step), prices taken from the server, and the return addresses sent to Stripe.
Result
The first round was seven patches. After the review it was nine, each with a test that fails on the old code. All of it is on the site; the game servers needed no change.
What we changed in how we work
Our own tests passed on the first fixes. The reviewer found the repeated key and the undo window by assuming the author’s picture of the flow was incomplete and trying other orders of events. So any change to money or sign-in now gets an independent reviewer whose only job is to break it, who writes the failing test but not the fix.
Still open
- Sessions do not expire on the server, and there is no Sign out everywhere.
- The page’s content policy only reports what it would block. Enforcing it needs hashes for the page’s two inline scripts and a place for reports to go.
- The 30-day gem hold is shorter than card disputes can take.
- Not audited yet: the game server’s full message list, every staff page one by one, the forum’s other routes, groups, teams, cups, clips and replay sharing, texture pack and map file imports, the map editor’s shared editing, and the season pass from start to finish.
- Skipping the age question keeps adult limits, by the owner’s decision of 22 Nov.