From b521da55d104da0d861c1b105fb09f1e2856a23b Mon Sep 17 00:00:00 2001 From: Kevin Atienza Date: Tue, 26 Sep 2023 13:16:29 +0800 Subject: [PATCH] TAMa: strip of leading and trailing spaces --- cms/server/contest/handlers/tasksubmission.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/server/contest/handlers/tasksubmission.py b/cms/server/contest/handlers/tasksubmission.py index 14e9d1cd60..901648ac51 100644 --- a/cms/server/contest/handlers/tasksubmission.py +++ b/cms/server/contest/handlers/tasksubmission.py @@ -72,7 +72,7 @@ def extract_files_from_request(request): filename = arg[len(prefix):] # python3.8 doesn't have removeprefix files.setdefault(filename, []).extend(HTTPFile( filename=filename, - body=value, + body=value.strip(), content_type='application/octet-stream', ) for value in values if value.strip())