diff options
author | Frederick Muriuki Muriithi | 2024-02-15 04:55:42 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-02-15 05:15:08 +0300 |
commit | 164d53f5f53a469730a66a0be0af7016c53f2aa5 (patch) | |
tree | 8c23903ed3a2d373a5078b07d4be55b9c996de67 /qc_app/upload | |
parent | 6b0ddee7a57a6d2e02024ebcd22dbe915d09e375 (diff) | |
download | gn-uploader-164d53f5f53a469730a66a0be0af7016c53f2aa5.tar.gz |
Provide only the file name, not full path.
There are 2 reasons to provide only the filename and not the full
path:
* Security: We do not want to inadvertently expose the paths to the
outside world, or allow users to enter file system paths for this
system.
* The code does not assume a complete path, rather, it builds the path
to the upload directory using the filename received from the user.
Diffstat (limited to 'qc_app/upload')
-rw-r--r-- | qc_app/upload/rqtl2.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qc_app/upload/rqtl2.py b/qc_app/upload/rqtl2.py index 48cb1d2..6a8ab72 100644 --- a/qc_app/upload/rqtl2.py +++ b/qc_app/upload/rqtl2.py @@ -225,7 +225,7 @@ def rqtl2_bundle_qc_status(jobid: UUID): species=species, population=population_by_species_and_id( dbconn, species["SpeciesId"], jobmeta["populationid"]), - rqtl2bundle=Path(jobmeta["rqtl2-bundle-file"]), + rqtl2bundle=Path(jobmeta["rqtl2-bundle-file"]).name, rqtl2bundleorig=jobmeta["original-filename"]) def compute_percentage(thejob, filetype) -> Union[str, None]: |