]> source.dussan.org Git - rspamd.git/commitdiff
When inserting a url to the tree also check phishing status to avoid masking of phish...
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Mon, 6 Aug 2012 13:57:40 +0000 (17:57 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Mon, 6 Aug 2012 13:57:40 +0000 (17:57 +0400)
src/util.c

index a6c56ea958c7c4d14f67b98d24c0e394c214822c..b721e838be852b33b4f3a745970de107c3c6a6d9 100644 (file)
@@ -1203,6 +1203,10 @@ compare_url_func (gconstpointer a, gconstpointer b)
        }
        else {
                r = g_ascii_strncasecmp (u1->host, u2->host, u1->hostlen);
+               if (r == 0 && u1->is_phished != u2->is_phished) {
+                       /* Always insert phished urls to the tree */
+                       return -1;
+               }
        }
 
        return r;