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

limit accessible paths #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

girtsf
Copy link

@girtsf girtsf commented Nov 29, 2019

Previously one could browse the whole filesystem on the machine that
snakeviz server was running on. Now we limit what can be viewed to the
filename that was passed in on command line.

In the future the CLI could be extended to allow browsing a directory of
profile files.

Previously one could browse the whole filesystem on the machine that
`snakeviz` server was running on. Now we limit what can be viewed to the
filename that was passed in on command line.

In the future the CLI could be extended to allow browsing a directory of
profile files.
@girtsf
Copy link
Author

girtsf commented Nov 29, 2019

Let me know if you think this is a good direction. I'm thinking maybe we can change the cli to accept <file or dir> [<file or dir> ...] and those automatically get added to allowed paths?

@girtsf
Copy link
Author

girtsf commented Nov 29, 2019

(It's failing on 2.7, but with py2 going EOL at end of year, maybe not worth supporting it?)

@joranbeasley
Copy link
Contributor

joranbeasley commented Apr 25, 2020

this seems to be available with self._list_dirs already (somewhat broken but I just submitted a pull request that should fix it)

@jiffyclub
Copy link
Owner

Thanks for submitting this! I don't think I'm quite ready to drop Python 2.7 support yet. Could this also be done with os.path operations? I'm also curious about the motivation for this, are you running into a specific situation in which you want to limit the browsable directory?

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.

3 participants