Skip Menu |

This queue is for tickets about the Mail-IMAPClient CPAN distribution.

Report information
The Basics
Id: 47706
Status: resolved
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: PLOBBES [...] cpan.org
Requestors: sitstst [...] mail.ru
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 3.21



Subject: <Без темы>
Date: Wed, 08 Jul 2009 19:56:54 +0400
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Sits tst <sitstst [...] mail.ru>
There is a problem with fetch_hash method. It cannot fetch safely ENVELOPE. It assume that any fetched value is one of quoted string, unquoted string or parenthesized value. But envelope has nested parentheses. envelope is ( "Date" "Subject" ( ( "from-name" "from-path" "from-localpart" "from-domain" ) [ .. more "from"s ] ) ( ( "sender-name" "sender-path" "sender-localpart" "sender-domain" ) [ .. more "sender"s ] ) ( ( "reply-name" "reply-path" "reply-localpart" "reply-domain" ) [ .. more "reply"s ] ) ( ( "reply-name" "reply-path" "reply-localpart" "reply-domain" ) [ .. more "reply"s ] ) ( ( "to-name" "to-path" "to-localpart" "to-domain" ) [ .. more "to"s ] ) ( ( "cc-name" "cc-path" "cc-localpart" "cc-domain" ) [ .. more "cc"s ] ) ( ( "bcc-name" "bcc-path" "bcc-localpart" "bcc-domain" ) [ .. more "bcc"s ] ) "ref-message-id" "message-id" ) All that structure is cut to first ")" i.e. after first "from" Moreover rfc-2822 does not deny using bare parentheses in any fields so problem not only with envelope but on some messages it can occur with any field, just with envelope it always occur on any message
Thanks for the report, I'm not sure why this was closed/deleted but I am reopening and will look into patching as time allows. If you have a suggested patch, I would also consider that as well.
Just released Mail::IMAPClient 3.21 which I believe should resolve this bug - could you please test and confirm?
I am going ahead and closing this bug with the release of Mail::IMAPClient 3.21 even though I didn't explicitly test this case. Please reopen if you find that the rewritten fetch_hash does not perform better. Please also feel free to contribute a small test case to the new t/fetch_hash.t tests if you have time!