this time *really* fix the /../ check ...

This commit is contained in:
Bodo Möller
2001-03-30 14:55:19 +00:00
parent ce3fc3956d
commit 19086ef67b

View File

@@ -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 */