From 0b17ed1171a8ebc49c3efbb34b78dae9b7b61a8a Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Mon, 11 May 2020 19:14:49 +0200 Subject: [PATCH] changed cgi --- software_objects/file-upload/upload.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software_objects/file-upload/upload.cgi b/software_objects/file-upload/upload.cgi index 50773e3..06839d7 100644 --- a/software_objects/file-upload/upload.cgi +++ b/software_objects/file-upload/upload.cgi @@ -17,7 +17,7 @@ UPLOADS = "/var/www/uploads/" def upload (inputname, upload_dir): form = cgi.FieldStorage() - if not form.has_key(inputname): return + if not inputname in form: return fileitem = form[inputname] if not fileitem.file: return fp = os.path.join(upload_dir, fileitem.filename)