From: Vsevolod Stakhov Date: Sat, 13 Aug 2016 15:44:48 +0000 (+0100) Subject: [CritFix] Fix setting of fuzzy keys (completely breaks fuzzy storage) X-Git-Tag: 1.3.3~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4b779222a899f5a09475f56afaa61bc1cd168fc;p=thirdparty%2Frspamd.git [CritFix] Fix setting of fuzzy keys (completely breaks fuzzy storage) --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 429360e1cc..1542c3d716 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -532,6 +532,7 @@ fuzzy_parse_rule (struct rspamd_config *cfg, const ucl_object_t *obj, } } + k = NULL; if ((value = ucl_object_lookup (obj, "fuzzy_key")) != NULL) { /* Create key from user's input */ k = ucl_object_tostring (value); @@ -547,6 +548,7 @@ fuzzy_parse_rule (struct rspamd_config *cfg, const ucl_object_t *obj, rspamd_cryptobox_hash (rule->hash_key->str, k, strlen (k), NULL, 0); rule->hash_key->len = rspamd_cryptobox_HASHKEYBYTES; + k = NULL; if ((value = ucl_object_lookup (obj, "fuzzy_shingles_key")) != NULL) { k = ucl_object_tostring (value); }