From: Vsevolod Stakhov Date: Fri, 22 Jun 2018 11:42:27 +0000 (+0100) Subject: [Minor] Ignore unknown font sizes for now X-Git-Tag: 1.7.7~58 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2779085c6126b86ea770c5a9c6c0b8c06da55bd8;p=rspamd.git [Minor] Ignore unknown font sizes for now --- 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;