]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Restore old hacks for flags propagation
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 10 Aug 2021 19:06:58 +0000 (20:06 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 10 Aug 2021 19:06:58 +0000 (20:06 +0100)
src/libserver/html/html.cxx
src/libserver/html/html_url.cxx

index fd0bfa495a559a31ccfc4446194ccee99a9b18f1..70ccd10b7475c3cb65335999fb98a7e257a2a8ce 100644 (file)
@@ -1382,6 +1382,8 @@ html_process_input(rspamd_mempool_t *pool,
                                        }
                                        else {
                                                url = maybe_existing;
+                                               /* Replace extra as well */
+                                               cur_tag->extra = maybe_existing;
                                                /* Increase count to avoid odd checks failure */
                                                url->count++;
                                        }
index a7f313a2c7d32017ca27bb86699859f3f5c6ccaf..ee9917b91a05d66f6a0507161482842d0af9f8b4 100644 (file)
@@ -181,7 +181,7 @@ html_url_is_phished(rspamd_mempool_t *pool,
                                                if (!rspamd_url_is_subdomain(disp_tok, href_tok)) {
                                                        href_url->flags |= RSPAMD_URL_FLAG_PHISHED;
                                                        href_url->linked_url = text_url;
-                                                       text_url->flags |= RSPAMD_URL_FLAG_HTML_DISPLAYED;
+                                                       text_url->flags |= RSPAMD_URL_FLAG_HTML_DISPLAYED|RSPAMD_URL_FLAG_PHISHED;
                                                }
                                        }
                                }
@@ -278,7 +278,7 @@ html_check_displayed_url(rspamd_mempool_t *pool,
                         */
                        if (turl->flags &
                                RSPAMD_URL_FLAG_FROM_TEXT) {
-                               turl->flags |= RSPAMD_URL_FLAG_HTML_DISPLAYED;
+                               turl->flags |= displayed_url->flags;
                                turl->flags &= ~RSPAMD_URL_FLAG_FROM_TEXT;
                        }