Gitweb links:
...log
http://git.netsurf-browser.org/netsurf-test.git/shortlog/7b235a6663ac95523eedbe9fbc206dcd06a11ce2
...commit
http://git.netsurf-browser.org/netsurf-test.git/commit/7b235a6663ac95523eedbe9fbc206dcd06a11ce2
...tree
http://git.netsurf-browser.org/netsurf-test.git/tree/7b235a6663ac95523eedbe9fbc206dcd06a11ce2
The branch, master has been updated
via 7b235a6663ac95523eedbe9fbc206dcd06a11ce2 (commit)
from ab72029ee2894eba9ac454ec916442a0099fa46f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf-test.git/commit/?id=7b235a6663ac95523eedbe9fbc206dcd06a11ce2
commit 7b235a6663ac95523eedbe9fbc206dcd06a11ce2
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
Update auth cgi to work with python 3.11
diff --git a/cgi-bin/auth.cgi b/cgi-bin/auth.cgi
index 5eebf4e..3f49135 100755
--- a/cgi-bin/auth.cgi
+++ b/cgi-bin/auth.cgi
@@ -1,16 +1,13 @@
#!/usr/bin/python3
-import cgi
-import cgitb
-cgitb.enable()
-
import os
+from urllib.parse import parse_qs
from base64 import b64decode
auth = os.getenv("HTTP_AUTHORIZATION")
query = os.getenv("QUERY_STRING") or
"user=foo&pass=bar&realm=NetSurf+Authentication+Test"
-query = cgi.parse_qs(query)
+query = parse_qs(query)
username = query.get("user", ["foo"])[0]
password = query.get("pass", query.get("password", ["bar"]))[0]
realm = query.get("realm", ["NetSurf Authentication Test"])[0]
-----------------------------------------------------------------------
Summary of changes:
cgi-bin/auth.cgi | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/cgi-bin/auth.cgi b/cgi-bin/auth.cgi
index 5eebf4e..3f49135 100755
--- a/cgi-bin/auth.cgi
+++ b/cgi-bin/auth.cgi
@@ -1,16 +1,13 @@
#!/usr/bin/python3
-import cgi
-import cgitb
-cgitb.enable()
-
import os
+from urllib.parse import parse_qs
from base64 import b64decode
auth = os.getenv("HTTP_AUTHORIZATION")
query = os.getenv("QUERY_STRING") or
"user=foo&pass=bar&realm=NetSurf+Authentication+Test"
-query = cgi.parse_qs(query)
+query = parse_qs(query)
username = query.get("user", ["foo"])[0]
password = query.get("pass", query.get("password", ["bar"]))[0]
realm = query.get("realm", ["NetSurf Authentication Test"])[0]
--
NetSurf test cases
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]