diff options
-rw-r--r-- | src/libserver/html.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c index e5e43aed6..7b570bdc4 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -1582,9 +1582,13 @@ rspamd_html_process_url_tag (rspamd_mempool_t *pool, struct html_tag *tag, gchar *buf; gsize orig_len; - if (rspamd_substring_search (start, len, "://", 3) == -1 && - (len >= sizeof ("data:") && - g_ascii_strncasecmp (start, "data:", sizeof ("data:") - 1) != 0)) { + if (rspamd_substring_search (start, len, "://", 3) == -1) { + + if (len >= sizeof ("data:") && + g_ascii_strncasecmp (start, "data:", sizeof ("data:") - 1) == 0) { + /* Image data url, never insert as url */ + return NULL; + } /* Assume relative url */ |