projects
/
15.05
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fe0660
)
[package] uhttpd: fix bug in path canonization introduced by r20883
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 15 Apr 2010 20:08:56 +0000
(20:08 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 15 Apr 2010 20:08:56 +0000
(20:08 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20885
3c298f89
-4303-0410-b956-
a3cf2f4a3e73
package/uhttpd/src/uhttpd-utils.c
patch
|
blob
|
history
diff --git
a/package/uhttpd/src/uhttpd-utils.c
b/package/uhttpd/src/uhttpd-utils.c
index
e65f213
..
96c0b82
100644
(file)
--- a/
package/uhttpd/src/uhttpd-utils.c
+++ b/
package/uhttpd/src/uhttpd-utils.c
@@
-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 != '/') )
;