]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix processing of skip-hashes in fuzzy storage
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 18 Nov 2017 16:58:34 +0000 (16:58 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 18 Nov 2017 16:58:34 +0000 (16:58 +0000)
MFH: rspamd-1.6

src/fuzzy_storage.c

index 4d5706eb9ace15a844cfb5b920ac869cda08e809..2ca300025584d2616402f65bdb8ef88b60c8b1bb 100644 (file)
@@ -857,8 +857,8 @@ rspamd_fuzzy_process_command (struct fuzzy_session *session)
        else {
                if (rspamd_fuzzy_check_client (session)) {
                        /* Check whitelist */
-                       if (session->ctx->skip_hashes) {
-                               rspamd_encode_hex_buf (cmd->digest, sizeof (cmd->cmd),
+                       if (session->ctx->skip_hashes && cmd->cmd == FUZZY_WRITE) {
+                               rspamd_encode_hex_buf (cmd->digest, sizeof (cmd->digest),
                                        hexbuf, sizeof (hexbuf) - 1);
                                hexbuf[sizeof (hexbuf) - 1] = '\0';