diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-07-16 15:55:50 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-07-16 15:55:50 +0100 |
commit | 8e8448abf85de2de8155c5e844c9287ecfc4f70d (patch) | |
tree | 13761b4efec95936c5bacf54e71987ec2d17e1e1 /src/libserver | |
parent | ab3dc8978f0c19beadf9fe41d93cc49230f11d52 (diff) | |
download | rspamd-8e8448abf85de2de8155c5e844c9287ecfc4f70d.tar.gz rspamd-8e8448abf85de2de8155c5e844c9287ecfc4f70d.zip |
[Minor] Ignore data urls
Diffstat (limited to 'src/libserver')
-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 */ |