6.0.0-beta6
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/9/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#2168] Compose window does not properly handle escaped quotes in To address
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ __.._..___._. [__)(__ | [__ | | .__)_|_| _|_
Comment
>> An address of the form > >> > >> "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. > >> > > > > I think there are two bugs causing this. One is in Mail::RFC822, in > _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. > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers