Summary | Compose window does not properly handle escaped quotes in To address |
Queue | IMP |
Queue Version | 4.0.3 |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | slusarz (at) horde (dot) org |
Requester | alh (at) indiana (dot) edu |
Created | 2005-06-22 (5690 days ago) |
Due | |
Updated | 2005-06-24 (5688 days ago) |
Assigned | 2005-06-23 (5689 days ago) |
Resolved | 2005-06-24 (5688 days ago) |
Milestone | |
Patch | No |
State ⇒ Resolved
The Mail_RFC822 function has already been fixed in the PEAR package by
Chuck. See:
http://pear.php.net/bugs/bug.php?id=2931
Bug 2142is a duplicate of this bug._validateQuotedString(). This regex:
return !(preg_match('/(.)[\x0D\\\\"]/', $qstring, $matches) &&
$matches[1] != '\\');
does not sucessfully distinguish between "Adrian "The Man" Hosey"
(illegal) and "Adrian \"The Man\" Hosey" (legal). Rather than continue
to torture the regex, I added this right before the regex:
$qstring_ary = explode('\"', $qstring);
$qstring = implode('', $qstring_ary);
pressing out any \" pairs, because we know they're okay.
The other bug is in Horde::MIME, in _rfc822Encode(). This line:
return '"' . str_replace('"', '\\"', str_replace('\\', '\\\\', $str)) . '"';
doesn't recognize that a \" pair inside a quoted-string doesn't need
to be escaped again.
State ⇒ Assigned
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Compose window does not properly handle escaped quotes in To address
Queue ⇒ IMP
"Adrian \"The Man\" Hosey" <alh@indiana.edu>
is legal by RFC2822 Section 3.2.5, but Imp has trouble with it. If you
attempt to reply to a message like that, it passes the address
validator, but it tries to send to "" (i.e. a blank) and the message
will be bounced by the MTA.