-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix: isValidASCIIURL should include path in check #29490
base: main
Are you sure you want to change the base?
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. |
Builds ready [376fcd1]
Page Load Metrics (1657 ± 75 ms)
|
? undefined | ||
: t('networkUrlErrorWarning', [toPunycodeURL(customRpcUrl)]), | ||
[t('networkURL')]: | ||
!customRpcUrl || isValidASCIIURL(customRpcUrl) |
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.
Nit: isValidASCIIURL
takes care of scenario when customRpcUrl
is not defined.
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.
we don't want to show the error if there is no URL passed so we need to check !customRpcUrl here
Builds ready [1f62cba]
Page Load Metrics (1676 ± 52 ms)
|
Builds ready [36f4134]
Page Load Metrics (1485 ± 42 ms)
|
Description
When the change network confirmation is shown, If there are non-ASCII characters in the URL, we should display a warning
example input: https://infura.io/gnosis?x=iոfura.io
new URL(input).href → 'https://infura.io/gnosis?x=i%D5%B8fura.io'
Related to: https://github.com/MetaMask/MetaMask-planning/issues/2365
Related issues
Fixes: #29489
Related to: https://github.com/MetaMask/MetaMask-planning/issues/2365
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist