openhuman
openhuman copied to clipboard
Bug: OpenhumanLinkModal accepts arbitrary event paths without allowlist
Summary
app/src/components/OpenhumanLinkModal.tsx listens for window.addEventListener('openhuman-link', handler) and processes detail.path without validating it against a known set. Any code (including injected scripts or agent-rendered content) can dispatch this event with arbitrary paths.
Impact
Low — Currently paths are just used as switch keys. But if future code adds side-effect handlers for new paths, the lack of validation becomes a boundary issue.
Suggested Fix
const ALLOWED_PATHS = new Set([
'settings/notifications', 'settings/billing', 'settings/messaging',
'community/discord', 'accounts/setup'
]);
if (!ALLOWED_PATHS.has(detail.path)) return;