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

Open tabs should be cleared when pervane is restarted with a different directory. #112

Open
metanet opened this issue Jun 7, 2020 · 2 comments
Projects

Comments

@metanet
Copy link
Collaborator

metanet commented Jun 7, 2020

Start pervane with dir1 and open some tabs in the browser. Then, restart pervane with dir2 and refresh the browser. This refresh does not clear the open tab list and if you click on any tab, it does not get the content. I think when pervane changes the working dir and it is refreshed on the browser, open tabs list should be cleared.

@hakanu
Copy link
Owner

hakanu commented Jun 13, 2020

Good catch. However, I guess this introduces some security implications. eg. we will start leaking user's "actual" dir passed as an arg into the javascript part.

So inclined not to do this. Any other ideas?

How i was originally planning:

  1. Send root dir from server to js
  2. In js if root dir is different from previous one in the browser's localstorage.
  3. delete all open tabs.

hakanu pushed a commit that referenced this issue Jun 13, 2020
@metanet
Copy link
Collaborator Author

metanet commented Jun 14, 2020

I dont think we need to expose root dir for that. We can create a random string for each root dir and put it into a file, for instance, into root_dir/.id and then send this random id to clients. We also dont show this file in the tree. With this approach I think you cannot expose root dir from a random string.

Wdyt

@hakanu hakanu added this to Bugs in Roadmap Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Roadmap
  
Bugs
Development

No branches or pull requests

2 participants