aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Durner <durner@gnunet.org>2005-12-22 19:23:05 +0000
committerNils Durner <durner@gnunet.org>2005-12-22 19:23:05 +0000
commit21f7935e7e3a8edceee0648500d2d2192d1b6cc0 (patch)
tree44aca3a316c3e1773a12752fed4d24a384df7b68
parent8abaad5d42671dfec96c145fbca43a2c51bf7585 (diff)
downloadgnunet-gtk-21f7935e7e3a8edceee0648500d2d2192d1b6cc0.tar.gz
gnunet-gtk-21f7935e7e3a8edceee0648500d2d2192d1b6cc0.zip
replace .. in filenames
-rw-r--r--src/plugins/fs/download.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c
index 18f81e7c..7a231111 100644
--- a/src/plugins/fs/download.c
+++ b/src/plugins/fs/download.c
@@ -420,7 +420,6 @@ void displayDownloadComplete(const struct ECRS_URI * uri,
420 GtkTreePath * path; 420 GtkTreePath * path;
421 struct ECRS_URI * u; 421 struct ECRS_URI * u;
422 char *dirPath; 422 char *dirPath;
423 char *dotdot;
424 423
425 pos = head; 424 pos = head;
426 while (pos != NULL) { 425 while (pos != NULL) {
@@ -534,12 +533,6 @@ void displayDownloadComplete(const struct ECRS_URI * uri,
534 } 533 }
535 fnURL[len] = 0; 534 fnURL[len] = 0;
536 535
537 /* avoid directory traversal */
538 while(dotdot = strstr(dstFile, "../")) {
539 dotdot[0] = '_';
540 dotdot[1] = '_';
541 }
542
543 /* If the file was downloaded before, fnURL is a symlink to 536 /* If the file was downloaded before, fnURL is a symlink to
544 dstFile */ 537 dstFile */
545 if ((READLINK(fnURL, dummy, 1) == -1) && (errno == EINVAL)) { 538 if ((READLINK(fnURL, dummy, 1) == -1) && (errno == EINVAL)) {