Opened 23 months ago

Last modified 8 weeks ago

#18039 new defect (bug)

Allow apostrophes in email addresses when accounts are added via Dashboard

Reported by: boonebgorges Owned by:
Priority: normal Milestone: Awaiting Review
Component: Users Version: 3.2
Severity: normal Keywords: has-patch dev-feedback 2nd-opinion
Cc: tom@…, beau@…, mail@…

Description

See #4616.

Currently it's not possible to add a user with an apostrophe in his email address in any of the following ways:

  • Dashboard > Add User (non-MS)
  • Dashboard > Add User > Add Existing User (MS)
  • Dashboard > Add User > Add New User (MS)

With existing users, you get a 'user not found' error. Otherwise you get an error about invalid email addresses.

This is inconsistent with WP's basic email address behavior, which allows apostrophes in email addresses.

For the most part, the problem is simply that the value of 'email' in the $_POST data must be stripslashed. In a few cases, adjustments had to be made to the way that email addresses are escaped, to allow for the ' character (see esc_email()).

See attached patch.

Attachments (1)

18039.diff (3.9 KB) - added by boonebgorges 23 months ago.

Download all attachments as: .zip

Change History (5)

  • Cc tom@… added
  • Cc beau@… added
  • Cc mail@… added
  • Keywords 2nd-opinion added
  • Severity changed from minor to normal

So - this has been open for 21 months. It's a real bug. It's not too hard to fix. There's a patch here.

Please can this be reviewed? We run into this issue often, and it's become a real irritation.

Note: See TracTickets for help on using tickets.