diff options
author | Omar Polo <op@omarpolo.com> | 2024-08-24 11:03:02 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2024-08-24 11:03:02 +0000 |
commit | 8538b548ddb627eae6511d10cc8524bc71920e40 (patch) | |
tree | 8a13c27288cdaa796aa2d2bc49f219fd2809e90a /regress | |
parent | b8bce50d98502b9790be3f2a0591f8baf5c0c6de (diff) |
regress: hide REMOTE_{ADDR,HOST} too
Diffstat (limited to 'regress')
-rw-r--r-- | regress/fcgi-test.c | 4 | ||||
-rw-r--r-- | regress/lib.sh | 9 |
2 files changed, 5 insertions, 8 deletions
diff --git a/regress/fcgi-test.c b/regress/fcgi-test.c index ed6ec4e..94a4358 100644 --- a/regress/fcgi-test.c +++ b/regress/fcgi-test.c @@ -202,7 +202,9 @@ parse_params(int sock, struct param *param, struct fcgi_header *hdr) must_read(sock, param->name, nlen); must_read(sock, param->value, vlen); - if (!strcmp(param->name, "SERVER_NAME")) + if (!strcmp(param->name, "SERVER_NAME") || + !strcmp(param->name, "REMOTE_ADDR") || + !strcmp(param->name, "REMOTE_HOST")) strlcpy(param->value, "<redacted>", sizeof(param->value)); consume(sock, hdr->padding); diff --git a/regress/lib.sh b/regress/lib.sh index 9abfa1e..46268ea 100644 --- a/regress/lib.sh +++ b/regress/lib.sh @@ -10,11 +10,6 @@ server_name= gghost= fcgi_content() { - remote_host=::1 - if [ "$HAVE_IPV6" != yes ]; then - remote_host=127.0.0.1 - fi - cat <<EOF Here's the parameters I've got: * AUTH_TYPE= @@ -23,8 +18,8 @@ Here's the parameters I've got: * PATH_INFO=$fcgi_path_info * PATH_TRANSLATED=$fcgi_path * QUERY_STRING= -* REMOTE_ADDR=$remote_host -* REMOTE_HOST=$remote_host +* REMOTE_ADDR=<redacted> +* REMOTE_HOST=<redacted> * REQUEST_METHOD=GET * SCRIPT_NAME= * SERVER_NAME=<redacted> |