From d8a43a539fb4fd8f0db9f3fc26cb41884b52e6a0 Mon Sep 17 00:00:00 2001 From: Fredrik Wrede Date: Mon, 17 Jun 2024 12:28:50 +0000 Subject: [PATCH] fix --- fedn/network/api/interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fedn/network/api/interface.py b/fedn/network/api/interface.py index 5cd465085..85dc1cc36 100644 --- a/fedn/network/api/interface.py +++ b/fedn/network/api/interface.py @@ -5,7 +5,7 @@ import uuid from io import BytesIO -from flask import jsonify, send_from_directory +from flask import jsonify, safe_join, send_from_directory from werkzeug.utils import secure_filename from fedn.common.config import get_controller_config, get_network_config @@ -377,7 +377,7 @@ def download_compute_package(self, name): try: data = self.control.get_compute_package(name) # TODO: make configurable, perhaps in config.py or package.py - file_path = os.path.join("/app/client/package/", name) + file_path = safe_join("/app/client/package/", name) with open(file_path, "wb") as fh: fh.write(data) # TODO: make configurable, perhaps in config.py or package.py