]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-settings: Improve parsing strlist/key/child
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 8 Jun 2023 09:45:30 +0000 (12:45 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:09 +0000 (12:34 +0200)
This is invalid in any case, but it's better to parse it as "key/child"
rather than ignoring the "key" part entirely. This was causing some
confusion when "plugin/mail_plugins/quota=yes" was used, since it was
handled the same as "plugin/quota=yes".

src/lib-settings/settings-parser.c

index 2a815dd56f0c535528afbf3998548b5362fe9b5e..ec18dcc984158bc34299214dbff4cfdfc45da69c 100644 (file)
@@ -275,7 +275,7 @@ settings_parse_strlist(struct setting_parser_context *ctx,
        const char *vkey, *vvalue;
        unsigned int i, count;
 
-       key = strrchr(key, SETTINGS_SEPARATOR);
+       key = strchr(key, SETTINGS_SEPARATOR);
        if (key == NULL)
                return;
        key++;