Skip to content
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

Shows brave://wallet alias under phishing detection and ENS redirect routes #4828

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

ryanml
Copy link
Contributor

@ryanml ryanml commented Mar 4, 2020

Fixes: brave/brave-browser#8524

Resolves

Submitter Checklist:

Test Plan:

Defined in issue

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@ryanml ryanml added this to the 1.7.x - Nightly milestone Mar 4, 2020
@ryanml ryanml requested a review from bbondy March 4, 2020 04:09
@ryanml ryanml self-assigned this Mar 4, 2020
@@ -38,6 +38,16 @@ void BraveLocationBarModelDelegate::FormattedStringFromURL(const GURL& url,
0,
base::UTF8ToUTF16(ethereum_remote_client_base_url),
base::UTF8ToUTF16("brave://wallet"));
base::ReplaceFirstSubstringAfterOffset(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think inside this conditional we're safe to just do a full string replace to brave://wallet, then this is future proofed for any other routes MM may add. @bbondy thoughts on safety?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ok as you have it. I wonder if we could just have ethereum_remote_client_base_url not have /home.html but it's not a big deal since you already have it this way.

@@ -38,6 +38,16 @@ void BraveLocationBarModelDelegate::FormattedStringFromURL(const GURL& url,
0,
base::UTF8ToUTF16(ethereum_remote_client_base_url),
base::UTF8ToUTF16("brave://wallet"));
base::ReplaceFirstSubstringAfterOffset(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ok as you have it. I wonder if we could just have ethereum_remote_client_base_url not have /home.html but it's not a big deal since you already have it this way.

@ryanml ryanml merged commit 3867e4b into master Mar 4, 2020
@ryanml ryanml deleted the fix-8524 branch March 4, 2020 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

brave://wallet alias not shown while looking up an ENS domain or on a suspicious site
2 participants