]> granicus.if.org Git - neomutt/commitdiff
Fix utf7/utf8 conversion of mailbox names in LIST response
authorPietro Cerutti <gahr@gahr.ch>
Fri, 3 May 2019 11:53:40 +0000 (11:53 +0000)
committerRichard Russon <rich@flatcap.org>
Fri, 3 May 2019 12:16:37 +0000 (13:16 +0100)
Because of a wrong argument passed into `imap_unmunge_mbox_name`, mailbox names
encoded in utf7 are not properly converted into utf8. This causes two problems:

1. mailbox names are mangled in the UI (M&AOY-lstr&APY-m instead of Mælström)

2. mailbox names are re-encoded to utf7 before being sent to the server,
resulting in "Mailbox does not exists" errors in commands such as DELETE

imap/command.c

index ab63f564fccff3df4119dc2ce4e64de7023dc80c..46b8eeed44a571f78949350238a6e6ab3aeefcc4 100644 (file)
@@ -630,7 +630,7 @@ static void cmd_parse_list(struct ImapAccountData *adata, char *s)
     s = imap_next_word(s);
     if (s[0] != '\0')
       s[-1] = '\0';
-    imap_unmunge_mbox_name(adata, list->name);
+    imap_unmunge_mbox_name(adata->unicode, list->name);
   }
 
   if (list->name[0] == '\0')