Forums Bug Reports Thread

Marketplace 'Bans' tab is unreachable — controller whitelist omits 'bans' so the tab never activates and ban/unban redirects land on the wrong tab

Patrick Bass · Jun 6 · 8 · 1 Locked
[Major] [High Priority] [Bug Fixed] [Always Reproduces]
🚀 OP Jun 6, 2026 8:34pm

Area: Admin deep-dive (commerce/config) (audit p15b) · Surface: /admin/marketplace?tab=bans · Dimension: Law 2 (no nav orphans) / functional · Severity: major

Clicking the 'Bans' tab (always visible) shows a different tab's content and never marks 'Bans' active, and the redirect after banning/unbanning a user never shows the bans list. The bans panel in the template is effectively dead because the controller refuses the tab value that would render it.

Evidence

templates/admin/marketplace/index.php:175 renders a permanent, clickable tab `'bans' => ['Bans', count($bannedUsers), 'danger', '/admin/marketplace?tab=bans']` and :471 has `<?php elseif ($tab === 'bans'): ?>` rendering the banned-users panel. But AdminMarketplaceController.php:60-64 whitelists only `['flagged','removed','reports','recent']` and silently rewrites any other value: `if (!in_array($tab, ['flagged','removed','reports','recent'], true)) { $tab = ... default ... }`. So $tab can never equal 'bans'. Worse, banUser() redirects to `/admin/marketplace?tab=bans` (AdminMarketplaceController.php:281) and unbanUser() to the same (:304) — both land on the default tab, never showing the result of the action just taken.

Suggested fix. Add 'bans' to the whitelist in AdminMarketplaceController.php:61 (`['flagged','removed','reports','recent','bans']`).

Filed by the automated tenant-app audit and adversarially evidence-verified. Status: verified. Open — not yet actioned.


Patrick Bass
@mobieus

🚀 Jun 7, 2026 5:25am

Resolved — fixed and deployed. Commit dd336ac47616, shipped dev-first then to all tenants on 2026-06-06.

Added 'bans' to the tab whitelist on line 61 of AdminMarketplaceController.php. banUser() and unbanUser() both redirect to /admin/marketplace?tab=bans, but 'bans' was missing from the in_array() allow-list, so the tab was silently discarded and fell back to flagged/reports/recent. php -l passes.

Status: fixed. Thread closed and locked.


Patrick Bass
@mobieus

Log in or register to reply to this thread.