You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem. Three Highs in files that skipped established patterns:
H1 Stored XSS: plans.ts:180 and :412 inject the API provider string into a class attribute + text via innerHTML with no whitelist (the fix already applied in history.ts:341 / recommendations.ts:2417).
H2users/userList.ts:321 adds a document-level change listener on every renderUsers() → N duplicate PATCH /users/:id + N toasts after N renders.
H3plans.ts:890setupRampScheduleHandlers re-binds static modal elements on every modal open.
Suggested fix. Extract a shared providerBadgeClass() in utils.ts (D1) and use it in all four sites (also fixes L4 dashboard regex); guard the document/modal listeners with an install-once flag or AbortController (the attachPopoverGlobalListeners pattern). Optionally add a delegate() helper (D4) to make delegation the default.
Verification sweep against main (101f099fb) on 2026-07-27 finds this already resolved.
plans.ts now uses providerBadgeHtml() and the duplicate modal/global listener issue is guarded.
Evidence: commit 84fcb9f.
Recommending close.
Verified resolved at 3c0f8ac: plans.ts renders the provider badge only through the shared providerBadgeHtml helper (whitelisted class, escaped label), the users list installs its document-level change listener through a single AbortController, and the ramp-schedule modal handlers are guarded by an install-once flag. Evidence: frontend/src/plans.ts:734 and frontend/src/users/userList.ts:415 (#1046). Residual axes checked: history.ts:520 and dashboard.ts:472 both use providerBadgeClass; no remaining raw provider interpolation into class or innerHTML in frontend/src. Closing as completed; reopen if the behaviour recurs.
Activity
fix(frontend): neutralise provider XSS and dedup modal/global listene…
cristim commentedon Jul 27, 2026
Verification sweep against
main(101f099fb) on 2026-07-27 finds this already resolved.plans.ts now uses providerBadgeHtml() and the duplicate modal/global listener issue is guarded.
Evidence: commit 84fcb9f.
Recommending close.
cristim commentedon Sep 2, 2026
Verified resolved at 3c0f8ac: plans.ts renders the provider badge only through the shared providerBadgeHtml helper (whitelisted class, escaped label), the users list installs its document-level change listener through a single AbortController, and the ramp-schedule modal handlers are guarded by an install-once flag. Evidence: frontend/src/plans.ts:734 and frontend/src/users/userList.ts:415 (#1046). Residual axes checked: history.ts:520 and dashboard.ts:472 both use providerBadgeClass; no remaining raw provider interpolation into class or innerHTML in frontend/src. Closing as completed; reopen if the behaviour recurs.