aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-13 17:50:02 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-13 17:50:02 +0000
commit1448ad63eb900be494f144b2a3946f1f496e8293 (patch)
treea9d1b1b6ce25066955cea461173f24a0ef688fb3
parent8777f9ece13fe50a7e8571d585d2b1fd4ca3f94d (diff)
downloadgnunet-gtk-1448ad63eb900be494f144b2a3946f1f496e8293.tar.gz
gnunet-gtk-1448ad63eb900be494f144b2a3946f1f496e8293.zip
do not allow downloading of sks/ksk URIs, block on attempt (#2003)
-rw-r--r--src/fs/gnunet-fs-gtk-event_handler.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fs/gnunet-fs-gtk-event_handler.c b/src/fs/gnunet-fs-gtk-event_handler.c
index 7520c48d..b1d89216 100644
--- a/src/fs/gnunet-fs-gtk-event_handler.c
+++ b/src/fs/gnunet-fs-gtk-event_handler.c
@@ -611,6 +611,13 @@ start_download (GtkTreeView * tree_view, GtkTreePath * path,
611 return; 611 return;
612 } 612 }
613 gtk_tree_model_get (tm, &iter, 0, &meta, 1, &uri, 9, &sr, 10, &mime, -1); 613 gtk_tree_model_get (tm, &iter, 0, &meta, 1, &uri, 9, &sr, 10, &mime, -1);
614 if (! (GNUNET_FS_uri_test_chk (uri) ||
615 GNUNET_FS_uri_test_loc (uri)) )
616 {
617 /* can only download chk/loc URIs, ignore */
618 g_free (mime);
619 return;
620 }
614 dlc = GNUNET_malloc (sizeof (struct DownloadContext)); 621 dlc = GNUNET_malloc (sizeof (struct DownloadContext));
615 dlc->uri = GNUNET_FS_uri_dup (uri); 622 dlc->uri = GNUNET_FS_uri_dup (uri);
616 dlc->mime = (NULL != mime) ? GNUNET_strdup (mime) : NULL; 623 dlc->mime = (NULL != mime) ? GNUNET_strdup (mime) : NULL;