commit db00be0: [Minor] Restore old hacks for flags propagation
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Aug 10 19:14:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-08-10 20:06:58 +0100
URL: https://github.com/rspamd/rspamd/commit/db00be0b4ac6b2f6c658e6d6a402625760d75814 (HEAD -> master)
[Minor] Restore old hacks for flags propagation
---
src/libserver/html/html.cxx | 2 ++
src/libserver/html/html_url.cxx | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index fd0bfa495..70ccd10b7 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 a7f313a2c..ee9917b91 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;
}
More information about the Commits
mailing list