Skip to content

Commit 455b47d

Browse files
committed
FTP/TFTP: Fix directory traversal regression, reported by Aaron Esau
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
1 parent 0fb2c03 commit 455b47d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/common.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ char *compose_path(ctrl_t *ctrl, char *path)
9292
strlcat(rpath, name, sizeof(rpath));
9393
}
9494

95-
if (!chrooted && strncmp(dir, home, strlen(home))) {
95+
if (!chrooted && strncmp(rpath, home, strlen(home))) {
9696
DBG("Failed non-chroot dir:%s vs home:%s", dir, home);
9797
return NULL;
9898
}

0 commit comments

Comments
 (0)