Forums Bug Reports Thread

Pending photo-tags review uses native confirm() and alert() (banned dialogs)

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

Area: Files, photos, gallery, ansi (audit p5) · Surface: /photos/tags/pending (pending tag review) · Dimension: native-dialogs · Severity: major

The tag-rejection confirmation and both error notices use native confirm()/alert(), which the Engineering Law bans. This is a user-facing moderation queue; the broken native dialogs undercut the otherwise-polished card UI on the same page.

Evidence

platform/templates/photos/pending-tags.php:118 `if (!confirm("Reject this tag? It'll be removed from the photo.")) return;`; :115 `else alert('Could not confirm: ' + (d.error || 'unknown'));`; :121 `else alert('Could not reject: ' + (d.error || 'unknown'));`. The page already carries $scriptNonce and runs in a context where App.modal/App.toast are loaded.

Suggested fix. Use App.modal.confirm('Reject tag', "Reject this tag? It'll be removed from the photo.", () => post(...)). Replace the two alert() calls with App.toast('Could not confirm: '+err, 'error') / App.toast('Could not reject: '+err, 'error').

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


Patrick Bass
@mobieus

🚀 Jun 7, 2026 5:15am

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

Replaced native confirm() on the Reject button with App.modal.confirm('Reject tag', ...) wrapping the delete POST in the onConfirm callback, and swapped both alert() error paths for App.toast('Could not confirm/reject: '+err, 'error'). php -l passes.

Status: fixed. Thread closed and locked.


Patrick Bass
@mobieus

Log in or register to reply to this thread.