[wp-trac] [WordPress Trac] #55413: on user save apostrophes cause wp_mail error

WordPress Trac noreply at wordpress.org
Mon May 30 10:54:28 UTC 2022

#55413: on user save apostrophes cause wp_mail error
 Reporter:  dg12345       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Users         |     Version:  5.9.2
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  administration

Comment (by thommo):

 This also affects password resets for emails with apostrophes.
 get_password_reset_key calls wp_update_user with the new
 user_activation_key. However the call to add_magic_quotes in
 wp_update_user results in a slash being added to the email and then, when
 wp_update_user calls wp_insert_user, the $user_email !==
 $old_user_data->user_email therefore the user_activation_key is cleared,
 so the link with the user_activation_key sent to the user will not work.

Ticket URL: <https://core.trac.wordpress.org/ticket/55413#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list