GNOME Bugzilla – Bug 735200
[IMAPx] Fails to handle QUOTA response with no quotas
Last modified: 2014-09-01 23:55:40 UTC
Created attachment 284163 [details] [review] patch to handle QUOTA responses with an empty resource lists The IMAP QUOTA extension permits the list of resource-usage-limit tuples in an untagged QUOTA response to be empty (see RFC2087 section 5.1, which states "The list contains zero or more triplets". This happens when the server supports quotas, but no quota is set on a particular mailbox. Unfortuantely, camel_imapx_parse_quota cannot handle an empty list, and instead reports "expecting atom!", as shown in the debugging output below: [imapx:A] camel_imapx_write: 'A00061 GETQUOTAROOT INBOX ' [imapx:A] camel_imapx_read: buffer is 'A00060 OK Completed ' [imapx:A] camel_imapx_read: buffer is '* QUOTAROOT INBOX user.jhutz * QUOTA user.jhutz () A00061 OK Completed ' [imapx:A] expecting atom! The attached patch (for master) fixes the problem, and additionally causes imapx_get_quota_info_sync() to return G_IO_ERROR_NOT_SUPPORTED when a folder has no quotas, which tells the caller the server does not support quotas for this mailbox, rather than G_IO_ERROR_NOT_FOUND, which is perhaps more correct but confuses the upper layers. I can also provide an equivalent patch for 3.10, which is a little different because 3.10 predates the introduction of CamelIMAPXInputStream. If 3.10 is no longer being maintained, I'll submit that version directly to the Ubuntu folks.
Thanks for a bug report and patch. It looks fine and my simple tests didn't show any issue, thus I'm committing it to master and stable: Created commit 4730ee9 in eds master (3.13.6+) [1] Created commit 6f6ebad in eds evolution-data-server-3-12 (3.12.6+) [1] https://git.gnome.org/browse/evolution-data-server/commit/?id=4730ee9
I forgot to add, 3.10.x is really out of question, I'm not going to commit anything there. Please, send your patch to respective distribution maintainers for inclusion, if needed.
OK; thanks for the update, and the clarification on 3.10. That's about what I expected, but I figured I'd offer it here before going downstream.