[Commits] [SCM] claws branch, master, updated. 3.17.5-22-gabfab6860

paul at claws-mail.org paul at claws-mail.org
Wed Jun 3 15:22:08 CEST 2020


The branch, master has been updated
       via  abfab6860f3edb8b3d7526804c2373db11fe3f6b (commit)
      from  cf7ccc9dc9c1861a6a24318280bd2560cbdc2313 (commit)

Summary of changes:
 src/textview.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit abfab6860f3edb8b3d7526804c2373db11fe3f6b
Author: Paul <paul at claws-mail.org>
Date:   Wed Jun 3 14:22:03 2020 +0100

    add Phishing warning when copying url
    
    closes RFE 4348 'display the phishing pop on "copy this libnk"' and ends continual badgering

diff --git a/src/textview.c b/src/textview.c
index ea20c125d..a76d88e2e 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2016 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -2976,16 +2976,16 @@ static void copy_uri_cb	(GtkAction *action, TextView *textview)
 	const gchar *raw_url =  g_object_get_data(G_OBJECT(textview->link_popup_menu),
 					   "raw_url");
 	if (uri) {
-		gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), uri->uri, -1);
-		gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), uri->uri, -1);
-		g_object_set_data(G_OBJECT(textview->link_popup_menu), "menu_button",
-			  NULL);
+		if (textview_uri_security_check(textview, uri) == TRUE) {
+			gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), uri->uri, -1);
+			gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), uri->uri, -1);
+			g_object_set_data(G_OBJECT(textview->link_popup_menu), "menu_button", NULL);
+		}
 	}
 	if (raw_url) {
 		gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), raw_url, -1);
 		gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), raw_url, -1);
-		g_object_set_data(G_OBJECT(textview->link_popup_menu), "raw_url",
-			  NULL);
+		g_object_set_data(G_OBJECT(textview->link_popup_menu), "raw_url", NULL);
 	}
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list