From: Fredrik Tolf Date: Fri, 30 Oct 2015 04:14:32 +0000 (+0100) Subject: call[fs]cgi: Fixed quoting bug. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=a80c8f02a49faab0b773c015fd90ba35bff1fad8;p=ashd.git call[fs]cgi: Fixed quoting bug. --- diff --git a/src/callfcgi.c b/src/callfcgi.c index 3dc23c0..6b04c20 100644 --- a/src/callfcgi.c +++ b/src/callfcgi.c @@ -473,8 +473,8 @@ static void mkcgienv(struct hthead *req, struct charbuf *dst) pi = sprintf2("/%s", tmp = pi); free(tmp); } - bufaddenv(dst, "PATH_INFO", pi); - bufaddenv(dst, "SCRIPT_NAME", url); + bufaddenv(dst, "PATH_INFO", "%s", pi); + bufaddenv(dst, "SCRIPT_NAME", "%s", url); bufaddenv(dst, "QUERY_STRING", "%s", qp?qp:""); free(pi); free(url); diff --git a/src/callscgi.c b/src/callscgi.c index 48d2362..3c26e33 100644 --- a/src/callscgi.c +++ b/src/callscgi.c @@ -436,8 +436,8 @@ static void mkcgienv(struct hthead *req, struct charbuf *dst) pi = sprintf2("/%s", tmp = pi); free(tmp); } - bufaddenv(dst, "PATH_INFO", pi); - bufaddenv(dst, "SCRIPT_NAME", url); + bufaddenv(dst, "PATH_INFO", "%s", pi); + bufaddenv(dst, "SCRIPT_NAME", "%s", url); bufaddenv(dst, "QUERY_STRING", "%s", qp?qp:""); free(pi); free(url);