Browse Source

Do not try to decrypt when no local key defined.

tags/1.0.4
Vsevolod Stakhov 8 years ago
parent
commit
dba32db2d5
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/fuzzy_storage.c

+ 5
- 0
src/fuzzy_storage.c View 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;

Loading…
Cancel
Save