From dba32db2d5ac6573ca54dbbcc2a7b377ab756ce4 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 1 Oct 2015 13:56:30 +0100 Subject: [PATCH] Do not try to decrypt when no local key defined. --- src/fuzzy_storage.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index c60046a5b..51611d523 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -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; -- 2.39.5