From abfab6860f3edb8b3d7526804c2373db11fe3f6b Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 3 Jun 2020 14:22:03 +0100 Subject: [PATCH] add Phishing warning when copying url closes RFE 4348 'display the phishing pop on "copy this libnk"' and ends continual badgering --- src/textview.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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); } } -- 2.25.1