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

Only allow Voila app to access a specific directory #113

Closed
giswqs opened this issue Sep 15, 2021 · 1 comment
Closed

Only allow Voila app to access a specific directory #113

giswqs opened this issue Sep 15, 2021 · 1 comment
Assignees
Labels
Feature Request New feature or request
Projects

Comments

@giswqs
Copy link
Member

giswqs commented Sep 15, 2021

When deploying a geemap web app using Voila, the open file dialogue allows access to the entire system directory, which is a security risk. ipyfilechoose v0.6.0 now allows restricting access to a specific directory by setting the sandbox_path property.
crahan/ipyfilechooser#35 (comment)

fc3 = FileChooser('/content/sample_data')
fc3.sandbox_path = '/content'  
fc3
@giswqs giswqs added the Feature Request New feature or request label Sep 15, 2021
@giswqs giswqs self-assigned this Sep 15, 2021
@giswqs giswqs added this to To do in leafmap via automation Sep 15, 2021
giswqs added a commit that referenced this issue Sep 17, 2021
giswqs added a commit that referenced this issue Sep 18, 2021
@giswqs
Copy link
Member Author

giswqs commented Sep 18, 2021

This feature has been implemented. One can now specify a sandbox_path. When the app is deployed using Voila, open-file dialogue can only access files within the sandbox_path, avoiding unauthorized access to system directories.

m = leafmap.Map(sandbox_path='/path/to/folder')

@giswqs giswqs closed this as completed Sep 18, 2021
leafmap automation moved this from To do to Done Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
Development

No branches or pull requests

1 participant