URL dialog: fix phishing attempt condition detection.
authorwwp <subscript@free.fr>
Thu, 2 Sep 2021 17:21:43 +0000 (19:21 +0200)
committerwwp <subscript@free.fr>
Thu, 2 Sep 2021 17:21:43 +0000 (19:21 +0200)
src/uri_opener.c

index b50321acc8e05ee10823ece54e6f3db37718b53a..d3c3584a28ccc951dff15f75f2367c3f93021aae 100644 (file)
@@ -295,7 +295,7 @@ static void uri_opener_list_view_insert_uri(GtkWidget *list_view,
        gchar *label = NULL;
 
        if (visible && strcmp(visible, uri->uri)) {
-               gboolean phishing_attempt = TRUE;
+               gboolean phishing_attempt = FALSE;
                if (strcmp(visible, uri->uri) != 0 && is_uri_string(visible)) {
                    gchar *uri_path;
                    gchar *visible_uri_path;
@@ -303,13 +303,13 @@ static void uri_opener_list_view_insert_uri(GtkWidget *list_view,
                    uri_path = get_uri_path(uri->uri);
                    visible_uri_path = get_uri_path(visible);
                    if (path_cmp(uri_path, visible_uri_path) != 0)
-                           phishing_attempt = FALSE;
+                           phishing_attempt = TRUE;
                }
                if (phishing_attempt) {
                        GdkColor color;
                        gchar buf[8];
 
-                       g_snprintf(buf, sizeof buf,  "#%6.6lx", prefs_common.color[COL_LOG_ERROR]);
+                       g_snprintf(buf, sizeof buf, "#%6.6lx", prefs_common.color[COL_LOG_ERROR]);
                        gtkut_convert_int_to_gdk_color(prefs_common.color[COL_LOG_ERROR], &color);
                        label = g_markup_printf_escaped("<span color=\"%s\"><b>%s</b></span>\n%s",
                                                buf, visible, uri->uri);