Repository navigation
fix: iOS deep link + Android prod package for task sharing - #4760
Conversation
iOS: Universal Links don't trigger for same-domain navigation (user is already on h.omi.me). Switch to omi:// custom URL scheme which opens the app directly. Android: Fix intent package from com.friend.ios.dev (dev flavor) to com.friend.ios (production). Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request effectively addresses critical deep linking issues for both iOS and Android platforms, ensuring the app opens as intended by updating the Android package name and using a custom URL scheme (omi://) for iOS. However, a high-severity Intent Injection vulnerability was identified in the Android link generation logic: the token parameter must be URL-encoded before being interpolated into the intent:// URL to prevent attackers from manipulating Intent parameters. The iOS custom scheme implementation and other metadata updates appear secure.
| ? `intent://h.omi.me/tasks/${token}#Intent;scheme=https;package=com.friend.ios;S.browser_fallback_url=${encodeURIComponent( | ||
| 'https://play.google.com/store/apps/details?id=com.friend.ios', | ||
| )};end` |
There was a problem hiding this comment.
While the update to the Android package name (com.friend.ios) is correct for production deep links, the token parameter is directly interpolated into the Android Intent URL without URL encoding. This creates a high-severity Intent Injection vulnerability. An attacker can provide a token containing a # character to inject arbitrary Intent parameters like package, action, or component, potentially leading to unintended actions or redirection to malicious applications. Ensure the token is URL-encoded to prevent this.
| ? `intent://h.omi.me/tasks/${token}#Intent;scheme=https;package=com.friend.ios;S.browser_fallback_url=${encodeURIComponent( | |
| 'https://play.google.com/store/apps/details?id=com.friend.ios', | |
| )};end` | |
| ? `intent://h.omi.me/tasks/${encodeURIComponent(token)}#Intent;scheme=https;package=com.friend.ios;S.browser_fallback_url=${encodeURIComponent( | |
| 'https://play.google.com/store/apps/details?id=com.friend.ios' | |
| )};end` |
Summary
Two bugs preventing "Open in Omi" from working on the task share page:
iOS (web): Universal Links don't trigger for same-domain navigation — user is already on
h.omi.meso tappinghttps://h.omi.me/tasks/{token}just reloads the page. Fixed by usingomi://custom URL scheme.Android (web): Intent URL had
package=com.friend.ios.dev(dev flavor) instead ofcom.friend.ios(production).App (Flutter):
omi://tasks/{token}parses "tasks" asuri.host(noturi.pathSegments), so the existing routing checkpathSegments.first == 'tasks'never matches. Addeduri.host == 'tasks'handler matching the pattern used by otheromi://callbacks (todoist, asana, etc).Files changed
web/frontend/src/app/tasks/[token]/page.tsxhttps://→omi://, Android: fix prod package nameapp/lib/core/app_shell.darturi.host == 'tasks'handler foromi://schemeTest plan
🤖 Generated with Claude Code