6.0.0-beta1
7/13/25

[#1352] MIME::encodeAddress() (implicitly) enforce RFC822 format checking before RFC2047 encoding
Summary MIME::encodeAddress() (implicitly) enforce RFC822 format checking before RFC2047 encoding
Queue Horde Framework Packages
Type Bug
State Resolved
Priority 1. Low
Owners Horde Developers (at) , slusarz (at) horde (dot) org
Requester rafan (at) csie (dot) org
Created 02/10/2005 (7458 days ago)
Due
Updated 06/14/2005 (7334 days ago)
Assigned 04/22/2005 (7387 days ago)
Resolved 06/14/2005 (7334 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/14/2005 12:11:08 AM Michael Slusarz Comment #7
State ⇒ Resolved
Reply to this comment
Duplicate of Bug 2086.
06/06/2005 06:15:55 PM it (at) flora38 (dot) ch Comment #6
New Attachment: imp_problem.jpg Download
Reply to this comment
I'm not sure, if my problem is related to this, but may be.



If I choose an address from the public addressbook, some of them miss 
the last character '>'. Allways the same address. It's different in 
firefox (worst), opera and IE.

In attachment you can see the picture (1. firefox, 2. IE, 3. opera)



Thanks a lot
05/12/2005 04:49:01 AM Michael Slusarz Comment #5 Reply to this comment
Unfortunately, still not seeing an easy way to implement this without 
destroying BC.
04/22/2005 09:24:10 AM Jan Schneider State ⇒ Assigned
 
04/05/2005 05:38:37 AM Michael Slusarz Comment #4
State ⇒
Priority ⇒ 1. Low
Reply to this comment
You are probably correct - we should handle an error returned from 
Mail_RFC822 much cleaner in MIME::encodeAddress().  Namely, we should 
return a PEAR_Error from encodeAddress() if an error is encountered.   
MIME::encodeAddress() is used all over the place, though, so there's 
quite a bit of code to patch.  Additionally, this might break BC 
since, when before MIME::encodeAddress() was returning an empty 
string, now it will be returning a PEAR_Error.  I think I need to 
think about this a bit more.
04/04/2005 03:02:30 PM rafan (at) csie (dot) org Comment #3 Reply to this comment
I agree with you. I found an example that should be work, but not.

Suppose I have a contact named ``foo <bar> <email>'' where bar is not his/her

email, but part of the name. This fails in Mail_RFC822::parseAddressList()

because <bar> is parsed as email, where <email> is the real one.



I think it is not easy to fix all situations since email list can be 
from hand typing

or selecting from contact. But letter case can be solved by store a 
real name/email

in somewhere and display them (IIRC, there is some discussion in the mailing).



At least, MIME::encodeAddress() SHOULD handle parsing error when calling

RFC822::parseAddressList() instead of do nothing. In this way, user 
will assume

their mail sent out, but in fact not. IMP's compose.php should also 
handle this.


03/04/2005 07:10:48 AM Michael Slusarz Comment #2
State ⇒ Not A Bug
Reply to this comment
The 4th parameter to Mail_RFC822::parseAddressList() indicates whether 
validation should be performed or not.  When false, as in MIME.php, 
validation is not performed in parseAddressList().  So multibyte 
characters should technically be OK.  If they are not being ignored 
correctly, this is a bug in Mail_RFC822, not Horde's MIME.
02/10/2005 11:42:36 PM Jan Schneider Assigned to Michael Slusarz
Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
 
02/10/2005 05:55:16 PM rafan (at) csie (dot) org Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ MIME::encodeAddress() (implicitly) enforce RFC822 format checking before RFC2047 encoding
Queue ⇒ Horde Framework Packages
State ⇒ Unconfirmed
Reply to this comment
When composing mail in IMP, eventually  imp/lib/Compose.php

calls MIME::encodeAddress() which has the following code segment:



         require_once 'Mail/RFC822.php';

         $parser = &new Mail_RFC822();

         $addr_arr = $parser->parseAddressList($text, $defserver, 
false, false);



The code segment above is BEFORE it does RFC2047 encoding.

The problem is Mail_RFC822's parseAddressList() will enforce

strict RFC822 format checking. For some multibyte characters, like Big5,

there is \ or ' in chatacter. So, these characters can not fulfill 
RFC822 format.



This has been discussed in imp mailing (2004 Aug to Oct) with the

thread: " [imp] address book -> compose window ".



Yes, it's a long time ago, but I was too busy that time, so here is the

ticket.



By the way, I just found that long time ago there already a _rfc822explode

like function called 'rfc822Explode()' in MIME.php (imported in rev 1.78, 2

years ago). So, I think this is a point that we can start from.


Saved Queries