[wp-trac] [WordPress Trac] #56090: wp_update_user doesn't update user_activation_key on users with apostrophes in their email

WordPress Trac noreply at wordpress.org
Wed Jun 29 20:12:24 UTC 2022


#56090: wp_update_user doesn't update user_activation_key on users with apostrophes
in their email
--------------------------+------------------------------
 Reporter:  petercwiley   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Users         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by petercwiley):

 I was able to patch this issue with the following:
 {{{#!php
 <?php
 function boardmc_remove_slashes_in_email( $raw_user_email ) {
   if ( str_contains( $raw_user_email, '\\' ) ) {
     $unslashed_user_email = stripslashes( $raw_user_email );
   }
   return $unslashed_user_email;
 }
 add_filter( 'pre_user_email', 'boardmc_remove_slashes_in_email', 10, 1 );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56090#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list