From: Aki Tuomi Date: Thu, 30 Jan 2025 12:37:46 +0000 (+0200) Subject: auth: Set error when field not found in auth_request_fields_var_expand_lookup() X-Git-Tag: 2.4.1~239 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8b9069429d0be8d910e10bd6161cf57429d2b46;p=thirdparty%2Fdovecot%2Fcore.git auth: Set error when field not found in auth_request_fields_var_expand_lookup() --- diff --git a/src/auth/auth-request.c b/src/auth/auth-request.c index e9adb5bee8..7ac368114e 100644 --- a/src/auth/auth-request.c +++ b/src/auth/auth-request.c @@ -810,13 +810,13 @@ auth_request_fields_var_expand_lookup(const char *field_name, const char **value { struct auth_fields *fields = context; - if (fields != NULL) { + if (fields != NULL) *value_r = auth_fields_find(fields, field_name); - return 0; - } else { + if (fields == NULL || *value_r == NULL) { *error_r = t_strdup_printf("No such field '%s'", field_name); return -1; } + return 0; } int auth_request_set_passdb_fields(struct auth_request *request,