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)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: tarek, Assigned: tarek)

Details

Attachments

(1 file, 1 obsolete file)

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
More precisely, only the Real Name part, of present needs to be encoded. http://www.ietf.org/rfc/rfc2047.txt
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+
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
Attachment #536730 - Attachment is obsolete: true
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+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
verified on stage 20110616
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: