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

Fix DevToolsWindow using original profile for Tor window #13887

Merged
merged 2 commits into from
Jun 22, 2022
Merged

Conversation

darkdh
Copy link
Member

@darkdh darkdh commented Jun 21, 2022

Resolves brave/brave-browser#23579

Tor profile only fulfills IsOffTheRecord() so we need to make it a primary OTR so it would behave same as private window.
This also disable Ambient auth for Tor. (It is disabled in private window but not for non primary OTR profile)
https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/net/profile_network_context_service.cc;l=168-172;drc=169c6cc102b39295a5bfe2f2a176b42b1c2fe2c4

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • 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)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • 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:

  1. Open Tor tab. open devtools, enter a=123
  2. Close Tor tab, open normal tab. open devtools, hit the up arrow. you won't be able to see a=123

@darkdh darkdh requested a review from bridiver June 21, 2022 18:52
@darkdh darkdh requested review from a team as code owners June 21, 2022 18:52
@darkdh darkdh self-assigned this Jun 21, 2022
@darkdh darkdh removed the request for review from a team June 21, 2022 19:36
@darkdh darkdh merged commit eb936e7 into master Jun 22, 2022
@darkdh darkdh deleted the devtools-tor branch June 22, 2022 00:15
@darkdh darkdh added this to the 1.42.x - Nightly milestone Jun 22, 2022
brave-builds pushed a commit that referenced this pull request Jun 22, 2022
@kjozwiak
Copy link
Member

Verification PASSED on Win 11 x64 using the following build(s):

Brave | 1.42.22 Chromium: 103.0.5060.53 (Official Build) nightly (64-bit)
-- | --
Revision | a1711811edd74ff1cf2150f36ffa3b0dae40b17f-refs/branch-heads/5060@{#853}
OS | Windows 11 Version 21H2 (Build 22000.739)

Reproduced the original issue using 1.40.105 Chromium: 103.0.5060.53 and ensured it wasn't happening using the STR/Cases outlined via #13887 (comment).

Example Example
tor tor1

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.

[hackerone] dev tool console leak in Tor window
4 participants