Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/SK-904 | Uncontrolled data used in path expression #635

Merged
merged 5 commits into from
Jun 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fedn/network/api/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading