feat: vault DIR — garde d'exclusion sur les lectures xlsx (vault Spark)
CI / lint (pull_request) Failing after 11s
CI / test (pull_request) Skipped
CI / build (pull_request) Skipped
CI / e2e (pull_request) Skipped
CI / security (pull_request) Failing after 24s

This commit is contained in:
Spark
2026-11-03 05:00:19 +00:00
parent 4c7195de2c
commit cf277e0959
+5
View File
@@ -246,6 +246,8 @@ def api_file_xlsx_dashboard(
"""
if not check_vault_access(vault_name, current_user):
raise HTTPException(status_code=403, detail=f"Accès refusé à la vault '{vault_name}'")
if chemin_exclu(vault_name, path):
raise HTTPException(status_code=404, detail=f"File not found: {path}")
_vault_root = get_vault_root(vault_name)
file_path = resolve_safe_path(_vault_root, path)
if not file_path.is_file():
@@ -314,6 +316,9 @@ def api_file_xlsx_sheet(
if not vault_data:
raise HTTPException(status_code=404, detail=f"Vault '{vault_name}' not found")
if chemin_exclu(vault_name, path):
raise HTTPException(status_code=404, detail=f"File not found: {path}")
file_path = resolve_safe_path(Path(vault_data["path"]), path)
if not file_path.is_file():
raise HTTPException(status_code=404, detail=f"File not found: {path}")