diff options
author | Bodo Möller <bodo@openssl.org> | 2001-03-30 14:55:50 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2001-03-30 14:55:50 +0000 |
commit | b10ae320f71d297476015fb1430032a6307d5dfd (patch) | |
tree | 2b7be7c31e9dc98ddaac1c6d3e59e0fd68d0a11f /apps | |
parent | 5d3ab9b096934c9d419be8c87324b7842d26d1f4 (diff) |
this time *really* fix the /../ check ...
Diffstat (limited to 'apps')
-rw-r--r-- | apps/s_server.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/s_server.c b/apps/s_server.c index f8e44ce43e..4223d2db1e 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -1436,9 +1436,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; @@ -1449,6 +1446,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 */ |