diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-28 13:33:23 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-28 13:33:23 +0100 |
commit | 8cbbfb21efa8edc9359c792f2668f5350cb1032c (patch) | |
tree | 5ae897179980e6b7e60aea52ac3573d64f2bdc5f | |
parent | d69aea948b25168bc6d0240009952b1e1ee32bc8 (diff) | |
download | rspamd-8cbbfb21efa8edc9359c792f2668f5350cb1032c.tar.gz rspamd-8cbbfb21efa8edc9359c792f2668f5350cb1032c.zip |
[Minor] Disable version 4 of hashes
-rw-r--r-- | src/fuzzy_storage.c | 12 | ||||
-rw-r--r-- | src/fuzzy_storage.h | 3 | ||||
-rw-r--r-- | src/plugins/fuzzy_check.c | 7 |
3 files changed, 2 insertions, 20 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 247653c1d..532532f16 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -745,18 +745,6 @@ rspamd_fuzzy_command_valid (struct rspamd_fuzzy_cmd *cmd, gint r) enum rspamd_fuzzy_epoch ret = RSPAMD_FUZZY_EPOCH_MAX; switch (cmd->version) { - case 4: - if (cmd->shingles_count > 0) { - if (r == sizeof (struct rspamd_fuzzy_shingle_cmd)) { - ret = RSPAMD_FUZZY_EPOCH11; - } - } - else { - if (r == sizeof (*cmd)) { - ret = RSPAMD_FUZZY_EPOCH11; - } - } - break; case 3: if (cmd->shingles_count > 0) { if (r == sizeof (struct rspamd_fuzzy_shingle_cmd)) { diff --git a/src/fuzzy_storage.h b/src/fuzzy_storage.h index c23672ed8..a9c3f174b 100644 --- a/src/fuzzy_storage.h +++ b/src/fuzzy_storage.h @@ -6,7 +6,7 @@ #include "shingles.h" #include "cryptobox.h" -#define RSPAMD_FUZZY_VERSION 4 +#define RSPAMD_FUZZY_VERSION 3 #define RSPAMD_FUZZY_KEYLEN 8 /* Commands for fuzzy storage */ @@ -24,7 +24,6 @@ enum rspamd_fuzzy_epoch { RSPAMD_FUZZY_EPOCH8, /**< 0.8 till 0.9 */ RSPAMD_FUZZY_EPOCH9, /**< 0.9 + */ RSPAMD_FUZZY_EPOCH10, /**< 1.0+ encryption */ - RSPAMD_FUZZY_EPOCH11, /**< 1.3+ multiple flags */ RSPAMD_FUZZY_EPOCH_MAX }; diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index bda4a12bc..1a2a9b782 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -54,12 +54,7 @@ #define DEFAULT_RETRANSMITS 3 #define DEFAULT_PORT 11335 -/* - * WARNING: - * As 1.3 is not yet stable, we want to keep compatibility here as 1.2 won't - * recognize version 4 unless 1.2.7 - */ -#define RSPAMD_FUZZY_PLUGIN_VERSION 3 +#define RSPAMD_FUZZY_PLUGIN_VERSION RSPAMD_FUZZY_VERSION static const gint rspamd_fuzzy_hash_len = 5; |