From 0ba731f50b4e6b75d32ddf8388fe32fad5cfadf3 Mon Sep 17 00:00:00 2001 From: Aurelien DARRAGON Date: Tue, 19 Sep 2023 18:28:44 +0200 Subject: [PATCH] MINOR: fcgi-app: "use-fcgi-app" requires TCP or HTTP mode Prevent the use of the "use-fcgi-app" keyword in proxy sections where neither TCP nor HTTP mode is set. --- src/fcgi-app.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fcgi-app.c b/src/fcgi-app.c index 829d1b128b..148ab5e222 100644 --- a/src/fcgi-app.c +++ b/src/fcgi-app.c @@ -591,6 +591,12 @@ static int proxy_parse_use_fcgi_app(char **args, int section, struct proxy *curp goto end; } + if (curpx->mode != PR_MODE_TCP && curpx->mode != PR_MODE_HTTP) { + memprintf(err, "'%s' requires TCP or HTTP mode", args[0]); + retval = -1; + goto end; + } + if (!*(args[1])) { memprintf(err, "'%s' expects as argument", args[0]); retval = -1;