summaryrefslogtreecommitdiff
path: root/cgi-bin
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2018-11-04 11:21:02 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2018-11-04 11:21:02 +0000
commit941f3a46a24008358989e9f61005ee82da6a8cc8 (patch)
tree71f6e21c9e6ca60f7ac7113634ece20f33972274 /cgi-bin
parent6cef78f9f3cad33c10000d97409ad99eb9611d95 (diff)
downloadnetsurf-test-941f3a46a24008358989e9f61005ee82da6a8cc8.tar.gz
netsurf-test-941f3a46a24008358989e9f61005ee82da6a8cc8.tar.bz2
Move settings in the hope we get something useful
Diffstat (limited to 'cgi-bin')
-rwxr-xr-xcgi-bin/auth.cgi10
1 files changed, 4 insertions, 6 deletions
diff --git a/cgi-bin/auth.cgi b/cgi-bin/auth.cgi
index 5f72447..c9faafc 100755
--- a/cgi-bin/auth.cgi
+++ b/cgi-bin/auth.cgi
@@ -4,6 +4,10 @@ import cgi
import cgitb
cgitb.enable()
+print('WWW-Authenticate: Basic realm="NetSurf Authentication test"')
+print('Content-Type: text/plain')
+print('')
+
import os
import base64
@@ -15,9 +19,6 @@ username = query.get("user", "foo")
password = query.get("pass", query.get("password", "bar"))
def badauth(reason="NOAUTH"):
- print('WWW-Authenticate: Basic realm="NetSurf Authentication test"')
- print('Content-Type: text/plain')
- print('')
print('result=BAD, reason={}'.format(reason))
raise SystemExit
@@ -37,7 +38,4 @@ else:
badauth("BADPASS")
-print("Content-Type: text/plain")
-print("")
-
print("result=GOOD, username={}, password={}".format(username, password))