diff --git a/www/lib/kojiweb/util.py b/www/lib/kojiweb/util.py index 7aa03665..bf099f5f 100644 --- a/www/lib/kojiweb/util.py +++ b/www/lib/kojiweb/util.py @@ -211,6 +211,12 @@ class FieldStorageCompat(Mapping): """Emulate the parts of cgi.FieldStorage that we need""" def __init__(self, environ): + qs = environ.get('QUERY_STRING', '') + if not qs: + # for python < 3.11, parse_qs will error on a blank string + self.data = {} + return + data = parse_qs(environ.get('QUERY_STRING', ''), strict_parsing=True, keep_blank_values=True) # replace singleton lists with single values