Skip to content

Commit

Permalink
doveadm: lowercase attribute names before trying to parse them
Browse files Browse the repository at this point in the history
This now matches what the imap server does.
  • Loading branch information
Josef 'Jeff' Sipek committed Sep 26, 2016
1 parent d05c38a commit f9c0271
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/doveadm/doveadm-mail-mailbox-metadata.c
Expand Up @@ -62,6 +62,8 @@ cmd_mailbox_metadata_parse_key(const char *arg,
enum mail_attribute_type *type_r,
const char **key_r)
{
arg = t_str_lcase(arg);

if (strncmp(arg, "/private/", 9) == 0) {
*type_r = MAIL_ATTRIBUTE_TYPE_PRIVATE;
*key_r = arg + 9;
Expand All @@ -78,7 +80,6 @@ cmd_mailbox_metadata_parse_key(const char *arg,
i_fatal_status(EX_USAGE, "Invalid metadata key '%s': "
"Must begin with /private or /shared", arg);
}
*key_r = t_str_lcase(*key_r);
}

static void
Expand Down

0 comments on commit f9c0271

Please sign in to comment.