TripMap renders map per pin-set change and leaks emoji into innerHTML #14
Labels
No labels
blocked:needs-decision
bug
chore
in-progress
security/high
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AuWoMe/planish#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
src/components/map/TripMap.tsx: the useEffect depends on [pins] and tears down/recreates the whole Mapbox instance on every pins identity change (each trip page render builds a new pins array), causing map flicker and token churn. Also line 46 injects getItemTypeMeta(pin.type).icon into innerHTML — icons are emoji strings today but this is an XSS-shaped pattern if a pin title/type ever becomes user-controlled. Fix: memoize pins, and build marker DOM with createElement/textContent.