Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Make private tabs pass the grep test #138

Closed
bbondy opened this issue Jan 11, 2016 · 7 comments
Closed

Make private tabs pass the grep test #138

bbondy opened this issue Jan 11, 2016 · 7 comments
Assignees

Comments

@bbondy
Copy link
Member

bbondy commented Jan 11, 2016

visit a site you've never been to before (goodeggs.com) in a private tab and then grep for goodeggs in /Users/yan/Library/Application Support/Brave. Found matches in /Cache/data_1 and /Cache/data_3.

@bbondy bbondy added the bug label Jan 11, 2016
@bbondy
Copy link
Member Author

bbondy commented Jan 19, 2016

@diracdeltas I can't reproduce this, what I do is visit goodeggs.com and then go inside my profile dir and run grep goodeggs -R . -a, it has no results. The same test to somewhere else in a normal tab does have results though.

@diracdeltas
Copy link
Member

Here is the test I just did:

  1. start brave
  2. cd /Users/yan/Library/Application Support/Brave/Cache
  3. grep -ir 'savecrypto' . -> no results
  4. open private tab, go to savecrypto.org
  5. grep -ir 'savecrypto' . -> Binary file ./data_1 matches, Binary file ./data_3 matches

@bbondy
Copy link
Member Author

bbondy commented Jan 19, 2016

Followed those exact steps but I am not reproducing. Could you debug and verify if in frame.js the partition is getting set correctly for you?

@diracdeltas
Copy link
Member

i added:

diff --git a/js/components/frame.js b/js/components/frame.js
index 47b4920..f6304f2 100644
--- a/js/components/frame.js
+++ b/js/components/frame.js
@@ -33,6 +33,7 @@ class Frame extends ImmutableComponent {
     this.webview.setAttribute('allowDisplayingInsecureContent', true)
     this.webview.setAttribute('preload', 'content/webviewPreload.js')
     if (this.props.frame.get('isPrivate')) {
+      console.log('setting private partition')
       this.webview.setAttribute('partition', 'private-1')
     }

and verified that the frame partition is being set. however, this is still happening.

@bbondy
Copy link
Member Author

bbondy commented Jan 20, 2016

strange, thanks for trying. Documentation I believe states it should work in memory only when no prefix, like I'm seeing. Sounds like an electron fix. Could you post an upstream issue with a modified STR?

@diracdeltas
Copy link
Member

I think I figured out two reasons that this is happening:

  1. favicons from private tabs (which are loaded outside of the webview partition) are hitting the cache. i confirmed that disabling setFavicon and faviconUtil.getFavicon made private tabs pass the grep test.
  2. independently, searching via cmd+k while a private tab is active seems to be writing the search query to cache. this is probably because we are sending one XHR per keystroke to the search autocomplete URL from the urlbar, which is also outside of the webview partition.

@diracdeltas diracdeltas self-assigned this Jan 26, 2016
@bbondy
Copy link
Member Author

bbondy commented Jan 26, 2016

Nice finds.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants