From: Vsevolod Stakhov Date: Tue, 10 Aug 2021 19:06:58 +0000 (+0100) Subject: [Minor] Restore old hacks for flags propagation X-Git-Tag: 3.0~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db00be0b4ac6b2f6c658e6d6a402625760d75814;p=thirdparty%2Frspamd.git [Minor] Restore old hacks for flags propagation --- diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx index fd0bfa495a..70ccd10b74 100644 --- a/src/libserver/html/html.cxx +++ b/src/libserver/html/html.cxx @@ -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++; } diff --git a/src/libserver/html/html_url.cxx b/src/libserver/html/html_url.cxx index a7f313a2c7..ee9917b91a 100644 --- a/src/libserver/html/html_url.cxx +++ b/src/libserver/html/html_url.cxx @@ -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; }