commit ab3dc89: [Minor] Fix data images processing in html links
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Jul 16 15:21:07 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-07-16 15:53:07 +0100
URL: https://github.com/rspamd/rspamd/commit/ab3dc8978f0c19beadf9fe41d93cc49230f11d52
[Minor] Fix data images processing in html links
---
src/libserver/html.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/libserver/html.c b/src/libserver/html.c
index 37c8858bd..e5e43aed6 100644
--- a/src/libserver/html.c
+++ b/src/libserver/html.c
@@ -1574,14 +1574,18 @@ rspamd_html_process_url_tag (rspamd_mempool_t *pool, struct html_tag *tag,
/* Check base url */
if (hc && hc->base_url && comp->len > 2) {
/*
- * Relative url canot start from the following:
+ * Relative url cannot start from the following:
* schema://
+ * data:
* slash
*/
gchar *buf;
gsize orig_len;
- if (rspamd_substring_search (start, len, "://", 3) == -1) {
+ if (rspamd_substring_search (start, len, "://", 3) == -1 &&
+ (len >= sizeof ("data:") &&
+ g_ascii_strncasecmp (start, "data:", sizeof ("data:") - 1) != 0)) {
+
/* Assume relative url */
gboolean need_slash = FALSE;
More information about the Commits
mailing list