Although probably atypical, it's not explicitly prohibited by the RFC for IMAP flags to contain parentheses. However, if a mailbox is selected and it contains flags that have an opening parenthesis in them (and possibly other characters), the function will return an error. Here's an example:
I'd never intentionally include parentheses in labels, but due to a bug in testing, I managed to add a malformed flag to a mailbox, and now I've basically made the mailbox permanently inaccessible to libetpan, since, to my knowledge, there is no way to remove flags from a mailbox (even if the messages with those flags are expunged). The mailbox would need to be deleted, after all messages are moved to another one. Unfortunately, this happened on an INBOX, so I can't do that; therefore, I think it is a somewhat high severity issue.
Although probably atypical, it's not explicitly prohibited by the RFC for IMAP flags to contain parentheses. However, if a mailbox is selected and it contains flags that have an opening parenthesis in them (and possibly other characters), the function will return an error. Here's an example:
I'd never intentionally include parentheses in labels, but due to a bug in testing, I managed to add a malformed flag to a mailbox, and now I've basically made the mailbox permanently inaccessible to libetpan, since, to my knowledge, there is no way to remove flags from a mailbox (even if the messages with those flags are expunged). The mailbox would need to be deleted, after all messages are moved to another one. Unfortunately, this happened on an INBOX, so I can't do that; therefore, I think it is a somewhat high severity issue.