From 524523387e1709410415db55f1033291859cf13d Mon Sep 17 00:00:00 2001 From: onefang Date: Mon, 27 Apr 2020 16:31:30 +1000 Subject: Don't fall over on NULL FCGI path. --- src/sledjchisl/sledjchisl.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/sledjchisl/sledjchisl.c') diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index f798f52..8e9108e 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -6652,6 +6652,13 @@ t("BODY"); I("%s %s://%s%s -> %s%s", Rd->Method, Rd->Scheme, Rd->Host, Rd->RUri, webRoot, Path); D("Started FCGI web request ROLE = %s, body is %s bytes, pid %d.", Role, Length, getpid()); + if (NULL == Path) + { + E("NULL path in FCGI request!"); + Rd->Rheaders->putstr(Rd->Rheaders, "Status", "404 Not Found"); + goto sendReply; + } + /* TODO - other headers may include - different Content-type Status: 304 Not Modified -- cgit v1.1