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

Only allow whitelisted protocols to load in Tor #583

Merged
merged 4 commits into from
Oct 9, 2018

Conversation

yrliou
Copy link
Member

@yrliou yrliou commented Oct 9, 2018

Close brave/brave-browser#1378

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Verified that these changes build without errors on
    • Windows
    • macOS
    • Linux
  • Verified that these changes pass automated tests (npm test brave_unit_tests && npm test brave_browser_tests) on
    • Windows
    • macOS
    • Linux
  • Ran git rebase master (if needed).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Yes or QA/No) to include the closed issue in milestone

Test Plan:

manual test:
Open a tor window and try to navigate to file://test should show an error page as below.
screen shot 2018-10-08 at 8 28 13 pm

auto test:
npm test brave_unit_tests -- --filter=BraveTorNetworkDelegateHelperTest.*

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

@yrliou yrliou self-assigned this Oct 9, 2018
@yrliou yrliou force-pushed the tor_allow_protocols_only branch 2 times, most recently from b6a87ed to 602a73a Compare October 9, 2018 03:26
@yrliou yrliou changed the title WIP: Only allow whitelisted protocols to load in Tor Only allow whitelisted protocols to load in Tor Oct 9, 2018
@yrliou yrliou force-pushed the tor_allow_protocols_only branch from c9ca92d to 6867ae6 Compare October 9, 2018 17:42
@yrliou yrliou requested review from darkdh and bbondy October 9, 2018 17:47
* You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "brave/browser/renderer_host/brave_navigation_ui_data.h"
#include "chrome/browser/renderer_host/chrome_navigation_ui_data.h"
Copy link
Member

Choose a reason for hiding this comment

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

this line is redundant

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed in 2a7f344, thanks.

@yrliou yrliou force-pushed the tor_allow_protocols_only branch from 6867ae6 to 6986029 Compare October 9, 2018 18:00
Copy link
Member

@darkdh darkdh left a comment

Choose a reason for hiding this comment

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

nice work for covering CreateForMainFrameNavigation

@yrliou yrliou merged commit cda0e77 into master Oct 9, 2018
yrliou added a commit that referenced this pull request Oct 9, 2018
Only allow whitelisted protocols to load in Tor
yrliou added a commit that referenced this pull request Oct 9, 2018
Only allow whitelisted protocols to load in Tor
@yrliou
Copy link
Member Author

yrliou commented Oct 9, 2018

master: cda0e77
0.55.x: f08bdd2
0.56.x: f95a053

@bsclifton bsclifton deleted the tor_allow_protocols_only branch October 14, 2018 05:07
@bbondy bbondy added this to the 0.55.x - Release milestone Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only allow whitelisted protocols in tor mode
3 participants