Skip to content

Commit

Permalink
fix security vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
mam10eks committed Dec 10, 2024
1 parent 97f357e commit 29577e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions application/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ install_requires =
requests
randomname
tqdm
werkzeug
mysqlclient
python-gitlab==4.10.0
GitPython
Expand Down
2 changes: 2 additions & 0 deletions application/src/tira_app/endpoints/v1/_anonymous.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from rest_framework.response import Response
from tira.check_format import _fmt, check_format, lines_if_valid
from tira.third_party_integrations import temporary_directory
from werkzeug.utils import secure_filename

from ... import model as modeldb
from ... import tira_model as model
Expand Down Expand Up @@ -62,6 +63,7 @@ def claim_submission(request: Request, vm_id: str, submission_uuid: str) -> Resp
body = json.loads(body)
result_dir = Path(settings.TIRA_ROOT) / "data" / "anonymous-uploads" / submission_uuid
format = json.loads(upload.dataset.format)[0]
format = secure_filename(format)
status_code, message = check_format(result_dir, format)

if status_code != _fmt.OK:
Expand Down

0 comments on commit 29577e2

Please sign in to comment.