struct fuzzy_client_result *res;
gboolean is_fuzzy = FALSE;
gchar hexbuf[rspamd_cryptobox_HASHBYTES * 2 + 1];
+ /* Discriminate scores for small images */
+ static const guint short_image_limit = 32 * 1024;
/* Get mapping by flag */
if ((map =
nval = fuzzy_normalize (rep->v1.value, weight);
if (io && (io->flags & FUZZY_CMD_FLAG_IMAGE)) {
- nval *= rspamd_normalize_probability (rep->v1.prob, 0.5);
+ if (!io->part || io->part->parsed_data.len <= short_image_limit) {
+ nval *= rspamd_normalize_probability (rep->v1.prob, 0.5);
+ }
+
type = "img";
res->type = FUZZY_RESULT_IMG;
}