Fix ambiguous 'online' column, and filter the auction-house bot too #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-ambiguous-online"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Regression from PR #2. Every character page returned a 500:
acore_auth.accounthas its ownonlinecolumn, and the character query selected several columns unqualified — so joining that table for the bot filter madeonlineambiguous.Qualifies every column in that SELECT with
characters, not just the one that collided, so a future join cannot reintroduce it.Search and guild listings were never affected:
DataTablesSsp.colSettingsToStralways qualifies withcolSettings.table || this.table, so its queries were already safe. Only this hand-written query had bare column names — which is why the search endpoint kept returning 200 while character pages failed.Verified against the live realm by running the full query, all fourteen columns:
Typecheck clean.
My testing of PR #2 is what let this through: I checked the join logic with a three-column SELECT rather than the real column list, so the ambiguity never had a chance to surface.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NW2ooBP2KPqQVzdZZDMvZd
The bot-account filter joins acore_auth.account, which has its own `online` column. The character query selected several columns unqualified, so `online` became ambiguous and every character page returned a 500: Error: Column 'online' in field list is ambiguous at CharacterController.getCharacterData Qualifies every column in that SELECT with `characters`, rather than only the one that collided, so a future join cannot reintroduce this. The search and guild listings were never affected: DataTablesSsp always qualifies its columns with the base table, and only this hand-written query did not. Verified against the live realm - the previously failing query for Heavenlymagi now returns its row, and a bot name still returns none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NW2ooBP2KPqQVzdZZDMvZdFix ambiguous 'online' column breaking every character pageto Fix ambiguous 'online' column, and filter the auction-house bot tooSecond commit on this branch, so it's one merge and one redeploy.
The auction-house bot account
AHOUSEowns 9 mule characters that were listing alongside real players — all level 1, namedBidfather,Stonks,Lowballerand so on. A single LIKE pattern couldn't cover both that andRNDBOT%.botAccountPatternbecomesbotAccountPatterns, a comma-separated list:Whitespace around entries is trimmed, and an empty list now disables the filter rather than emitting a clause that matches nothing — so a misconfiguration fails open and shows everyone, instead of silently hiding the whole realm.
The stack default is
RNDBOT%,ahouse;config.default.jsonkeeps the genericRNDBOT%so this stays upstreamable.Verified against the live realm:
Also exercised the clause builder directly — two patterns, whitespace, a single pattern, an empty string, and an embedded apostrophe all produce what they should.
While checking, the only other non-player account is
ACMAINT, which owns no characters and so never appears. Nothing else needs filtering today.