mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-24 02:36:27 +00:00
2800ebdcff
The workspace add endpoint used resolve_trusted_workspace() which blocks any path outside the user's home directory, the saved workspace list, or BOOT_DEFAULT_WORKSPACE. This created a circular dependency: to add /mnt/d/Projects you need it in the saved list, but to get it in the list you need to add it. Fix: introduce validate_workspace_to_add() used by /api/workspaces/add, which only blocks non-existent paths, non-directories, and known system roots. The stricter resolve_trusted_workspace() is still used for actual file operations within a workspace. Fixes #953. Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>