summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2001-03-30 14:55:19 +0000
committerBodo Möller <bodo@openssl.org>2001-03-30 14:55:19 +0000
commit19086ef67b7158374306e162331291dd1163ed62 (patch)
treed28ac6fca9644471f4b27802315b43edb8dc6873 /apps
parentce3fc3956d0c6d292edb687ec8ad1e3c7e36ca02 (diff)
this time *really* fix the /../ check ...
Diffstat (limited to 'apps')
-rw-r--r--apps/s_server.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index 2e61799fde..97e477bde2 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -1361,9 +1361,6 @@ static int www_body(char *hostname, int s, unsigned char *context)
switch (dot)
{
- case 0:
- dot = (e[0] == '/') ? 1 : 0;
- break;
case 1:
dot = (e[0] == '.') ? 2 : 0;
break;
@@ -1374,6 +1371,8 @@ static int www_body(char *hostname, int s, unsigned char *context)
dot = (e[0] == '/') ? -1 : 0;
break;
}
+ if (dot == 0)
+ dot = (e[0] == '/') ? 1 : 0;
}
dot = (dot == 3) || (dot == -1); /* filename contains ".." component */