Skip to content

Change ipfs scheme handling #7785

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

Merged
merged 1 commit into from
Feb 7, 2021
Merged

Change ipfs scheme handling #7785

merged 1 commit into from
Feb 7, 2021

Conversation

spylogsster
Copy link
Contributor

@spylogsster spylogsster commented Feb 2, 2021

Resolves brave/brave-browser#13872

We should change this to only keep ipfs:// and ipns:// when the address being loaded when:
i) Using the Brave node and the port matches the Brave node's port.
ii) Using the public node and the port matches the public node, and it is localhost.
iii) When user enters custom public gateway Brave should always replace raw IP (127.0.0.1) with localhost, as that enables subdomains and origin isolation. Raw IP can't have subdomains and all content roots share the same origin, which we don't want in browser.

Submitter Checklist:

  • There is a ticket for my issue.
  • Used Github auto-closing keywords in the commit message.
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed).
  • Requested a security/privacy review as needed.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

Described here brave/brave-browser#13872

@spylogsster spylogsster force-pushed the change-ipfs-scheme-handling branch from f7bff1f to 9356bb4 Compare February 2, 2021 17:04
@spylogsster spylogsster requested a review from bbondy February 2, 2021 17:04
@spylogsster spylogsster force-pushed the change-ipfs-scheme-handling branch from 9356bb4 to 8c64443 Compare February 3, 2021 10:54
@spylogsster spylogsster force-pushed the change-ipfs-scheme-handling branch 7 times, most recently from e9a9740 to d496806 Compare February 4, 2021 18:41
@spylogsster spylogsster force-pushed the change-ipfs-scheme-handling branch 7 times, most recently from e248a44 to 9499570 Compare February 6, 2021 15:28
@bbondy bbondy added CI/skip-android Do not run CI builds for Android CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 labels Feb 6, 2021
We should change this to only keep ipfs:// and ipns:// when the address being loaded when:
i) Using the Brave node and the port matches the Brave node's port.
ii) Using the public node and the port matches the public node, and it is localhost.
iii) When user enters custom public gateway Brave should always replace raw IP (127.0.0.1) with localhost,
as that enables subdomains and origin isolation. Raw IP can't have subdomains and
all content roots share the same origin, which we don't want in browser.
@bbondy bbondy force-pushed the change-ipfs-scheme-handling branch from 9499570 to cd2b323 Compare February 6, 2021 21:09
@bbondy bbondy merged commit c652170 into master Feb 7, 2021
@bbondy bbondy deleted the change-ipfs-scheme-handling branch February 7, 2021 00:58
@bbondy bbondy added this to the 1.22.x - Nightly milestone Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-android Do not run CI builds for Android CI/skip-macos-x64 Do not run CI builds for macOS x64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security] Improve handling of address bar display for IPFS and IPNS
2 participants