-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: Handle messages from Android and iOS WebViews which detect iFrame urls and send them to React Native app #16706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
…e urls and send them to React Native app
60d2854 to
efa4fd5
Compare
|
|
smilingkylan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM



Description
Issue: https://github.com/MetaMask/mobile-planning/issues/2227
We currently have an anti-fishing warning which is displayed when user opens a malicious website.
But there is a way to bypass this warning if you load a malicious website via iFrame.
Example of the malicious website: https://coin-qr.to/
Example of the website with a malicious iFrame: https://lol-au4.pages.dev/cb (opens coin-qr.to inside in the iFrame)
We can inject a JS script in the mobile browser that will check webpage's iFrames and report their URLs to the browser in MetaMask mobile app.
Related issues
Android change: MetaMask/react-native-webview-mm#60
iOS change: MetaMask/react-native-webview-mm#61
Manual testing steps
Screenshots/Recordings
Android and iOS videos:
https://github.com/user-attachments/assets/dba5ff6e-5c7b-41d6-9a8c-426dfb7dede6
https://github.com/user-attachments/assets/dd90b6d5-28c6-47de-9ee6-daa5f048ea44
Pre-merge author checklist
Pre-merge reviewer checklist