cyrusimap / cyrus-imapd

Cyrus IMAP is an email, contacts and calendar server
http://cyrusimap.org
Other
524 stars 145 forks source link

THREAD command doesn't support quoted charset #1340

Closed brong closed 13 years ago

brong commented 13 years ago

From: Bron Gondwana Bugzilla-Id: 3428 Version: 2.4.7 Owner: Bron Gondwana

brong commented 13 years ago

From: Bron Gondwana

<jkt> brong: looks like Cyrus IMAP4 v2.2.12 hasa bug in that it doesn't accept quoted "charset" arguments to the THREAD commands: <jkt> 13:53 < |miska|> 13:53:25.695 >>> y42 UID THREAD REFERENCES "utf-8" ALL <jkt> 13:53 < |miska|> 13:53:25.727 <<< y42 BAD Missing charset in Thread <brong> jkt: do I care about Cyrus 2.2? <jkt> brong: is that fixed in newer branches? <brong> dunno <brong> y42 UID THREAD REFERENCES "utf-8" ALL <brong> y42 BAD Missing charset in Thread

From the RFC: http://tools.ietf.org/search/rfc5256

charset = atom / quoted ; CHARSET values MUST be registered with IANA

brong commented 13 years ago

From: Bron Gondwana

Fixed in git. Will be in the next -stable.

brong commented 13 years ago

From: Jeroen van Meeuwen (Kolab Systems)

Also correct version

brong commented 13 years ago

From: Øyvind Kolbu

The fix is wrong, as now quoting is required, instead of just supported.

On a 2.4.8alpha1: . UID THREAD REFERENCES utf-8 ALL . BAD Missing charset in Thread but with quotes is supported . UID THREAD REFERENCES "utf-8" ALL . UID OK Completed (5333 msgs in 0.110 secs)

which is the opposite of 2.4.7: . UID THREAD REFERENCES utf-8 ALL . OK Completed (35 msgs in 0.000 secs) vs . UID THREAD REFERENCES "utf-8" ALL . BAD Missing charset in Thread

The rfc seems to require that both are supported:

charset = atom / quoted ; CHARSET values MUST be registered with IANA

brong commented 13 years ago

Attachment-Id: 1372 From: Øyvind Kolbu Type: text/plain File: 0008-Accept-both-quoted-and-non-quoted-charset.patch

Fix to accept both quoted and non-quoted charset.

brong commented 13 years ago

From: Bron Gondwana

Thanks for the patch! I'd already got it in -master, just hadn't backported the fix. I did exactly what you did, and it will be in 2.4.8.