-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Interface Affected
- Web (app.uniswap.org)
App Version
- Version: Production build (hash-router landing logic)
- Production build
System / Environment Info
- Browser: All browsers
Steps to Reproduce
- Open
https://app.uniswap.org/#//example.orgin a clean browser session. - Allow the landing page to finish loading.
- A "Something went wrong" modal appears with a
SecurityErrorstack trace.
Expected Behavior
Ignore external-looking hash fragments or redirect only to internal routes without raising errors.
Actual Behavior
- Fragment is passed to React Router's
<Navigate>. - Router calls
history.replaceState('https://example.org/'); the browser rejects it withSecurityError. - User stays on
app.uniswap.orgbut sees the error overlay until reload.
Screenshots or Screen Recording
Screenshot available showing the "Something went wrong" overlay with the SecurityError stack trace.
Additional Context
- Logic lives in
apps/web/src/pages/RouteDefinitions.tsxvia<Navigate to={args.hash.replace('#', '')} />. - Sanitising fragments (e.g., require a leading
/) preserves legacy hashes like#/swapwhile avoiding the error. - No cross-origin redirect occurs; the issue is limited to a user-visible error state.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working