]> source.dussan.org Git - rspamd.git/commitdiff
Do not try to decrypt when no local key defined.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 1 Oct 2015 12:56:30 +0000 (13:56 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 1 Oct 2015 12:56:30 +0000 (13:56 +0100)
src/fuzzy_storage.c

index c60046a5b23b6046f3cc6e60d1421e47d9c480d2..51611d5230587aa53b945fd02b51e69139710633 100644 (file)
@@ -258,6 +258,11 @@ rspamd_fuzzy_decrypt_command (struct fuzzy_session *s)
        gsize payload_len;
        struct rspamd_http_keypair rk;
 
+       if (s->ctx->key == NULL) {
+               msg_warn ("received encrypted request when encryption is not enabled");
+               return FALSE;
+       }
+
        if (s->cmd_type == CMD_ENCRYPTED_NORMAL) {
                hdr = &s->cmd.enc_normal.hdr;
                payload = (guchar *)&s->cmd.enc_normal.cmd;