From: Aki Tuomi Date: Mon, 18 Nov 2024 08:19:07 +0000 (+0200) Subject: var-expand-crypt: Ensure iv or salt is given in raw mode X-Git-Tag: 2.4.0~246 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56ad08ccce182ce35c81975875c889b21434e74c;p=thirdparty%2Fdovecot%2Fcore.git var-expand-crypt: Ensure iv or salt is given in raw mode Would generate non-decryptable output otherwise. --- diff --git a/src/plugins/var-expand-crypt/var-expand-crypt-plugin.c b/src/plugins/var-expand-crypt/var-expand-crypt-plugin.c index d864edcbc0..88f4888359 100644 --- a/src/plugins/var-expand-crypt/var-expand-crypt-plugin.c +++ b/src/plugins/var-expand-crypt/var-expand-crypt-plugin.c @@ -201,6 +201,9 @@ static int var_expand_crypt_settings(struct var_expand_state *state, return -1; } else if (parse_parameters(ctx, parts, error_r) < 0) return -1; + } else if (ctx->raw && ctx->iv == NULL && ctx->salt == NULL) { + *error_r = "In raw format, salt or IV must be given"; + return -1; } if (ctx->iv == NULL) {