-
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(settings): fixed two IPFS gateway issues #19700
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. |
5158666
to
e684692
Compare
Codecov Report
@@ Coverage Diff @@
## develop #19700 +/- ##
===========================================
+ Coverage 68.84% 69.17% +0.33%
===========================================
Files 993 994 +1
Lines 38258 38271 +13
Branches 10248 10251 +3
===========================================
+ Hits 26338 26472 +134
+ Misses 11920 11799 -121
|
This comment was marked as outdated.
This comment was marked as outdated.
bc924d8
to
74e3b25
Compare
Removed dependencies detected. Learn more about Socket for GitHub ↗︎ 🚮 Removed packages: [email protected] |
This comment was marked as outdated.
This comment was marked as outdated.
4bba7de
to
22193b8
Compare
22193b8
to
b7713c5
Compare
This comment was marked as outdated.
This comment was marked as outdated.
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.
Valid-url removal is really nice. Though I can still enter IPFS with spaces. We need to validate that?
256262783-ecfb30b2-cc4a-4a3d-80eb-e4853af45734.mov
This is a tricky situation, because a URL actually can have a How do we handle this in other places? |
Spaces are allowed in the path, but not the origin. We need to retain some amount of validation here to protect users from accidentally entering invalid URLs. Elsewhere we validate using the |
@Gudahtt it's actually already validating through URL Try I'm not actually sure if |
@Gudahtt @NidhiKJha update... you cannot have a domain name with an encoded space in it because
Options:
Any preferences? |
3484147
to
fa9aca7
Compare
2c264d6
to
fd24646
Compare
@Gudahtt @NidhiKJha I fixed the URL validation this way:
It also now incorporates the changes from #20172 Hopefully should be good to approve and merge now |
This comment was marked as outdated.
This comment was marked as outdated.
@@ -83,27 +83,14 @@ async function addEthereumChainHandler( | |||
); | |||
} | |||
|
|||
const isLocalhost = (strUrl) => { |
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.
Looking this function properly for the first time, it was introduced in #14272.
I find these magic values problematic. What about foo.localhost
, localhost.localdomain
, self-mapped hostnames, or other loopback addresses like ::1
(i see this in particular regularly tripping people up) or the rest of 127.0.0.0/8
? Sure it's usually possible to work around but seems arbitrary and could be a potential cause of hair-pulling in places. So this may need to be revised (possibly even resulting in new user-facing-preference(s)?). Heck, if someone wants to run a block explorer over file://
or some protocol we're not having in mind right now, why not let them?
While the changes in this PR still look like an improvement and resolving that aspect is probably out of scope here, moving this function out to util.ts
invites use from other parts of the code, so perhaps it can be moved back and unexported for now?
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.
Yeah I see what you mean... it's better, but not good enough to put in util. I moved the new version of it back to add-ethereum-chain.js
.
d978752
to
338c8ee
Compare
Builds ready [5050bc2]
Page Load Metrics (1515 ± 58 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
5050bc2
to
777c5bf
Compare
Builds ready [777c5bf]
Page Load Metrics (1472 ± 50 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
777c5bf
to
a82362e
Compare
Builds ready [a82362e]
Page Load Metrics (1437 ± 45 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Explanation
adds back in two bugfixes that were originally in feat(srp): add a quiz to the SRP reveal #19283
achieves 100% code coverage for /ui/pages/settings/security-tab
removes the npm package
valid-url
, which has not been updated in 10 years