summary refs log tree commit diff
path: root/www
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-14 15:55:00 +0000
committerJune McEnroe <june@causal.agency>2020-07-14 15:55:00 +0000
commit632df75fe87b5e5a14c4f3895b609852be46a294 (patch)
tree6b322b2ac0f2249010b035b6da48a6942c014fec /www
parentAdd CGI upload program for temp.causal.agency (diff)
downloadsrc-632df75fe87b5e5a14c4f3895b609852be46a294.tar.gz
src-632df75fe87b5e5a14c4f3895b609852be46a294.zip
Check that there is upload data
Diffstat (limited to 'www')
-rw-r--r--www/temp.causal.agency/up.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/www/temp.causal.agency/up.c b/www/temp.causal.agency/up.c
index b004abd3..9e7b4ff7 100644
--- a/www/temp.causal.agency/up.c
+++ b/www/temp.causal.agency/up.c
@@ -81,7 +81,7 @@ static enum kcgi_err handle(struct kreq *req) {
 
 	} else if (req->method == KMETHOD_POST) {
 		struct kpair *field = req->fieldmap[0];
-		if (!field) return fail(req, KHTTP_400);
+		if (!field || !field->valsz) return fail(req, KHTTP_400);
 
 		char name[256];
 		const char *ext = strrchr(field->file, '.');
>Switch to timespec for timeoutsJune McEnroe 2020-08-14Implement serviceStartJune McEnroe 2020-08-14Flesh out Service structJune McEnroe 2020-08-14Build environment for servicesJune McEnroe 2020-08-14Implement spawntab parsingJune McEnroe 2020-08-14Open syslog, daemonize, write PIDJune McEnroe 2020-08-14Implement user and group lookupJune McEnroe 2020-08-14Add install targetJune McEnroe 2020-08-14Add spawnd skeletonJune McEnroe