From cf277e09591720b6778ce91ea28dc62dd646a0b0 Mon Sep 17 00:00:00 2001 From: Spark Date: Tue, 3 Nov 2026 05:00:19 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20vault=20DIR=20=E2=80=94=20garde=20d'exc?= =?UTF-8?q?lusion=20sur=20les=20lectures=20xlsx=20(vault=20Spark)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/routers/files_read.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/routers/files_read.py b/backend/routers/files_read.py index 3f17b8f..8159aa9 100644 --- a/backend/routers/files_read.py +++ b/backend/routers/files_read.py @@ -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}")