From 3fd685a6f997bb310f4086c76287edcedb7db5bf Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 14 Jul 2020 15:55:00 +0000 Subject: Check that there is upload data --- www/temp.causal.agency/up.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'www/temp.causal.agency') diff --git a/www/temp.causal.agency/up.c b/www/temp.causal.agency/up.c index fe12f75c..885b8acd 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, '.'); -- cgit 1.4.1