Add a commit about how to handle environment variables. - geomyidae - A small C-based gopherd.
HTML git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit fc6e766a8c45e7a83a0f3b40345b7dccf4e49b11
DIR parent d8ae4004e9ef36ea38296205f3723527d45a17a5
HTML Author: Christoph Lohmann <20h@r-36.net>
Date: Mon, 13 Aug 2018 15:09:10 +0200
Add a commit about how to handle environment variables.
Diffstat:
M ind.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
DIR diff --git a/ind.c b/ind.c
@@ -471,7 +471,10 @@ void
setcgienviron(char *file, char *path, char *port, char *base, char *args,
char *sear, char *ohost, char *chost)
{
-
+ /*
+ * TODO: Clean environment from possible unsafe environment variables.
+ * But then it is the responsibility of the script writer.
+ */
unsetenv("AUTH_TYPE");
unsetenv("CONTENT_LENGTH");
unsetenv("CONTENT_TYPE");