mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
feat(library): support LIBRARY_BROWSE_ROOT to restrict file path access
Introduce a LIBRARY_BROWSE_ROOT environment variable (defaulting to the current directory) to restrict directories users can browse and select when setting up library paths. Add a PathPolicyService on the backend to enforce path containment checks securely, and update the frontend FolderPickerModal to prevent navigating above the configured browse root. Closes #567
This commit is contained in:
@@ -22,6 +22,10 @@ SETUP_BOOTSTRAP_TOKEN=
|
||||
# ../local/data points to <project-root>/local/data.
|
||||
APP_DATA_PATH=../local/data
|
||||
|
||||
# Top of the library creation folder picker. Defaults to / when unset.
|
||||
# Set this to the server-visible folder where users should create libraries.
|
||||
# LIBRARY_BROWSE_ROOT=../local/books
|
||||
|
||||
# File write scheduler and concurrency tuning (optional)
|
||||
# FILE_WRITE_DEBOUNCE_MS=3000
|
||||
# FILE_WRITE_MAX_CONCURRENT_WRITES=2
|
||||
|
||||
Reference in New Issue
Block a user