Closed
Bug 661247
Opened 14 years ago
Closed 14 years ago
remove utf-8 encoding from sreg reset password email To: and From: headers
Categories
(Cloud Services :: Server: Core, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: tarek, Assigned: tarek)
Details
Attachments
(1 file, 1 obsolete file)
|
4.95 KB,
patch
|
telliott
:
review+
|
Details | Diff | Splinter Review |
The encoding of the headers should not occur when there are no non-ascii characters.
(services.util.send_email)
To: and From: headers, specifically. it's perfectly okay to encode Subject:.
Summary: bad headers encoding when sending e-mails → remove utf-8 encoding from sreg reset password email To: and From: headers
| Assignee | ||
Comment 2•14 years ago
|
||
More precisely, only the Real Name part, of present needs to be encoded.
http://www.ietf.org/rfc/rfc2047.txt
| Assignee | ||
Comment 3•14 years ago
|
||
Attachment #536730 -
Flags: review?(telliott)
Comment 4•14 years ago
|
||
Comment on attachment 536730 [details] [diff] [review]
This patch makes sure only the Real Name igets encoded in the To anf From field, if provided
Looks good. I'm a little concerned about the regex picking up stray other stuff, and you might want to toss an @ into the second part to ensure an email address. but it should work.
Attachment #536730 -
Flags: review?(telliott) → review+
| Assignee | ||
Comment 5•14 years ago
|
||
This regexp is just looking for the "real name <email>" pattern without any strict control on whether the email is valid or not. We have another function that does this in util (valid_email)
We could add a call to it in send_email for controlling the emails but I guess that'd be a new feature
| Assignee | ||
Comment 6•14 years ago
|
||
Attachment #536740 -
Flags: review?(telliott)
| Assignee | ||
Updated•14 years ago
|
Attachment #536730 -
Attachment is obsolete: true
Comment 7•14 years ago
|
||
Comment on attachment 536740 [details] [diff] [review]
Better patch: uses rfc822.AddressList to parse the address
Well, that seems a lot simpler.
Attachment #536740 -
Flags: review?(telliott) → review+
| Assignee | ||
Comment 8•14 years ago
|
||
| Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•