aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Brannon <chris@the-brannons.com>2021-10-14 18:38:53 -0700
committerChristopher Brannon <chris@the-brannons.com>2021-10-14 18:39:04 -0700
commit1c58a06e4799ad166aba0341ff52cb38dde527cc (patch)
tree9a93fdba7ccd1f9bd2f8d02a5c52124f913dfff9
parent0d556243b8aba50e0bc638f0669702bf9f211641 (diff)
downloadnawp-1c58a06e4799ad166aba0341ff52cb38dde527cc.tar
nawp-1c58a06e4799ad166aba0341ff52cb38dde527cc.tar.gz
nawp-1c58a06e4799ad166aba0341ff52cb38dde527cc.tar.bz2
nawp-1c58a06e4799ad166aba0341ff52cb38dde527cc.tar.lz
nawp-1c58a06e4799ad166aba0341ff52cb38dde527cc.tar.xz
nawp-1c58a06e4799ad166aba0341ff52cb38dde527cc.tar.zst
nawp-1c58a06e4799ad166aba0341ff52cb38dde527cc.zip
Actually fix a bug I claimed to fix.HEAD0.3master
Commit 0d556243b8aba50e0bc638f0669702bf9f211641 wasn't actually a fix.
-rwxr-xr-xnawp.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/nawp.scm b/nawp.scm
index 5bc6f07..86d683a 100755
--- a/nawp.scm
+++ b/nawp.scm
@@ -346,8 +346,14 @@
(print "If this program is called without arguments, it operates in CGI mode.\n")))
(define (main)
+ (when
+ (and
+ (get-environment-variable "GATEWAY_INTERFACE")
+ (not (null? (command-line-arguments))))
+ (http-fail 400 "Bad request.")
+ (exit 1))
(match (command-line-arguments)
- (() (when (get-environment-variable "GATEWAY_INTERFACE") (cgi-main)))
+ (() (cgi-main))
((adduser username display-name)
(add-user username (read-password "Password: ") display-name))
(everything-else (help))))