diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-22 12:42:27 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-22 12:42:27 +0100 |
commit | 2779085c6126b86ea770c5a9c6c0b8c06da55bd8 (patch) | |
tree | 62f364139c142cead69167ddcd80cdc2871224c3 | |
parent | 3311477ebbd8e5457cbb2b75dec67cf58727acf6 (diff) | |
download | rspamd-2779085c6126b86ea770c5a9c6c0b8c06da55bd8.tar.gz rspamd-2779085c6126b86ea770c5a9c6c0b8c06da55bd8.zip |
[Minor] Ignore unknown font sizes for now
-rw-r--r-- | src/libserver/html.c | 18 | ||||
-rw-r--r-- | src/libstat/stat_process.c | 4 | ||||
-rw-r--r-- | src/rspamd_proxy.c | 2 |
3 files changed, 16 insertions, 8 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c index d41ae78d9..85602aec5 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -2077,12 +2077,20 @@ rspamd_html_process_font_size (const gchar *line, guint len, guint *fs, len --; } - rspamd_strlcpy (numbuf, p, MIN (sizeof (numbuf), len + 1)); - sz = strtod (numbuf, &err); + if (g_ascii_isdigit (*p)) { + rspamd_strlcpy (numbuf, p, MIN (sizeof (numbuf), len + 1)); + sz = strtod (numbuf, &err); - /* Now check leftover */ - if (sz < 0) { - sz = 0; + /* Now check leftover */ + if (sz < 0) { + sz = 0; + } + } + else { + /* Ignore the rest */ + failsafe = TRUE; + sz = is_css ? 16 : 1; + /* TODO: add textual fonts descriptions */ } if (err && *err != '\0') { diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c index eb8b8bd7c..978c8f3c0 100644 --- a/src/libstat/stat_process.c +++ b/src/libstat/stat_process.c @@ -528,12 +528,12 @@ rspamd_stat_classifiers_process (struct rspamd_stat_ctx *st_ctx, * Do not classify a message if some class is missing */ if (!(task->flags & RSPAMD_TASK_FLAG_HAS_SPAM_TOKENS)) { - msg_warn_task ("skip statistics as SPAM class is missing"); + msg_info_task ("skip statistics as SPAM class is missing"); return; } if (!(task->flags & RSPAMD_TASK_FLAG_HAS_HAM_TOKENS)) { - msg_warn_task ("skip statistics as HAM class is missing"); + msg_info_task ("skip statistics as HAM class is missing"); return; } diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index 055421a41..5ec9cdce2 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -1941,7 +1941,7 @@ proxy_client_finish_handler (struct rspamd_http_connection *conn, /* Reset spamc legacy */ if (msg->method >= HTTP_SYMBOLS) { - msg->method = HTTP_GET; + msg->method = HTTP_POST; if (msg->flags & RSPAMD_HTTP_FLAG_SPAMC) { session->legacy_support = LEGACY_SUPPORT_SPAMC; |