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') {
* 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;
}
/* 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;