diff options
-rwxr-xr-x | nawp.scm | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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)))) |