uhttpd: fix bug in path canonization introduced by r20883
SVN-Revision: 20885
This commit is contained in:
parent
20ef055c2f
commit
14428874ae
1 changed files with 3 additions and 2 deletions
|
@ -420,8 +420,9 @@ static char * canonpath(const char *path, char *path_resolved)
|
|||
}
|
||||
|
||||
/* collapse /x/../ */
|
||||
else if( path_cpy[2] == '.' )
|
||||
{
|
||||
else if( (path_cpy[2] == '.') &&
|
||||
((path_cpy[3] == '/') || (path_cpy[3] == '\0'))
|
||||
) {
|
||||
while( (path_res > path_resolved) && (*--path_res != '/') )
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in a new issue