summaryrefslogtreecommitdiff
path: root/cgi-bin
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2018-11-04 11:26:56 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2018-11-04 11:26:56 +0000
commitcef783d1432efc5594c2d9ad39e6749b1c4e95d9 (patch)
tree0044620d7e7df73117668833bb334173fa606180 /cgi-bin
parent7f626ba0c9e9f091f9e677d4ed3a405dc54ba2f2 (diff)
downloadnetsurf-test-cef783d1432efc5594c2d9ad39e6749b1c4e95d9.tar.gz
netsurf-test-cef783d1432efc5594c2d9ad39e6749b1c4e95d9.tar.bz2
Of course cgi parameters are lists
Diffstat (limited to 'cgi-bin')
-rwxr-xr-xcgi-bin/auth.cgi4
1 files changed, 2 insertions, 2 deletions
diff --git a/cgi-bin/auth.cgi b/cgi-bin/auth.cgi
index 16cbf8f..83210d8 100755
--- a/cgi-bin/auth.cgi
+++ b/cgi-bin/auth.cgi
@@ -15,8 +15,8 @@ auth = os.getenv("HTTP_AUTHORIZATION")
query = os.getenv("QUERY_STRING") or "user=foo&pass=bar"
query = cgi.parse_qs(query)
-username = query.get("user", "foo")
-password = query.get("pass", query.get("password", "bar"))
+username = query.get("user", ["foo"])[0]
+password = query.get("pass", query.get("password", ["bar"]))[0]
gotuser = None
gotpass = None