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

Ephemeral mode #562

Closed
fanglingsu opened this issue May 20, 2019 · 7 comments
Closed

Ephemeral mode #562

fanglingsu opened this issue May 20, 2019 · 7 comments

Comments

@fanglingsu
Copy link
Owner

Allow to run vimb in ephemeral mode to not store sensitive data in filesystem and to not allow websites to store data in the browser. It makes no sense to allow to switch an always running vimb instance into ephemeral mode. So it's enought to give this by command line option at the time --ephemeral.

affected files

Following files under $XDG_CONFIG_HOME/vimb should be used read only when
ephemeral mode is on.

  • closed
  • command
  • coonied.db - this file must not be used because we want the cookies to be
    stored in webkit runtime memory only.
  • history
  • search

Only the queue and bookmark files should be allowed to be written.

do write operations in memory

To provide also completions for url, search queries and commands, it would be great to allow to store those data in memory instead of the files and to merge thems into the result like they where read from the files.

references

webkit_web_context_new_ephemeral

@cdlscpmv
Copy link
Contributor

Good proposal!

Perhaps, creating a few temporary files in /tmp for every ephemeral instance is one way to go. They can be merged on the fly with the rest of the profile data sitting in ~/.config. The problem is that vimb should somehow detect when the last window assosiated with the instance is closed and then remove the temporary files.

Also, I think a new "closed" file should be created for a new ephemeral instance. This would allow reopening a previously closed window but only if that window had been opened in the ephemeral instance.

@fanglingsu
Copy link
Owner Author

I don't like the idea to write files in ephemeral mode. OK, ite would be easy to do but on multiuser systems they might leak data. And in case vimb crashes they would be left on disc.

@cdlscpmv
Copy link
Contributor

The function shm_open(3) stores files in memory on Linux (I guess, the same is true for BSDs also) which implies that they will live till the next reboot if left undeleted. They can be swapped out to disk though, but this also applies to the memory used by WebKit itself.

On Linux the temporary files reside in /dev/shm. By setting appropriate permissions on them the problem of data leaks in multiuser systems can be mitigated.

fanglingsu added a commit that referenced this issue Jun 3, 2019
Do not consider file to be existent which was on startup. This allows
also to benenfit from files created by other vimb instances spawned
later.
fanglingsu added a commit that referenced this issue Jun 4, 2019
If vimb is started with --ephemeral option no files are created by
default and no persistent cookie manager is used.
@fanglingsu
Copy link
Owner Author

I've implemented Ephemeral/Incognito mode and I'l try it out on my daily work.

@cdlscpmv
Copy link
Contributor

cdlscpmv commented Jun 8, 2019

I've just tested it, and it seems to work. Unfortunately, the browsing history is not preserved when opening a new window with :tabopen (I don't know if cookies are). I don't think it's a big deal, since solving the above issues requires either creating new files or having some sort of IPC between the incognito instances.

@fanglingsu
Copy link
Owner Author

@cdlscpmv Cookies are also not preserved on opening an new window. But I think this is acceptable for a one window browser at the time.

@fanglingsu
Copy link
Owner Author

I've merge the branch into master.

fanglingsu added a commit that referenced this issue Jun 14, 2019
Also removed obsolete 'private-browsing' setting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants