From a673a264090d35e5c6b9fae45aacae6f9521ec0d Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Fri, 20 Jan 2023 19:22:23 +0000 Subject: [PATCH] Replace deprecated cgi module in loginurl tests --- tests/checker/cgi-bin/input2cookies.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/checker/cgi-bin/input2cookies.py b/tests/checker/cgi-bin/input2cookies.py index 0225953e..8abd97ee 100755 --- a/tests/checker/cgi-bin/input2cookies.py +++ b/tests/checker/cgi-bin/input2cookies.py @@ -1,11 +1,11 @@ #!/usr/bin/python3 -import cgi from http import cookies +import sys +import urllib.parse -form = cgi.FieldStorage() C = cookies.SimpleCookie() -for field in form: - C[field] = form.getvalue(field) +for field, value in urllib.parse.parse_qsl(sys.stdin.read()): + C[field] = value print(C)