Prevents nasty crash later on if template has 'key = value'
dovecot: auth: Panic: file auth-request.c: line 1746 (auth_request_set_field): assertion failed: (*name != '\0')
else
key = t_strdup_until(*tmp, value++);
+ if (*key == '\0')
+ i_fatal("Invalid passdb template %s - key must not be empty",
+ args);
+
key = p_strdup(pool, key);
value = p_strdup(pool, value);
array_append(&tmpl->args, &key, 1);
else
key = t_strdup_until(*tmp, value++);
+
+ if (*key == '\0')
+ i_fatal("Invalid userdb template %s - key must not be empty",
+ args);
+
nonull_value = value == NULL ? "" : value;
if (strcasecmp(key, "uid") == 0) {
uid = userdb_parse_uid(NULL, nonull_value);