[wp-trac] [WordPress Trac] #44107: wp_insert_user should return WP_Error if user_url's length is too long

WordPress Trac noreply at wordpress.org
Mon Jan 31 15:59:59 UTC 2022


#44107: wp_insert_user should return WP_Error if user_url's length is too long
-------------------------------------------------+-------------------------
 Reporter:  tszming                              |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.0
Component:  Users                                |     Version:  2.0
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:
  feedback                                       |  administration
-------------------------------------------------+-------------------------

Comment (by Cybr):

 I did not test the code, but just for sanity, if we now insert a few mb*
 chars (`strlen( $user_url ) > 100 === true`), this "empty registration
 email"-issue will no longer happen? If it does, shouldn't we use
 `strlen()` instead of `mb_strlen()`?

 {{{
 echo mb_strlen( str_repeat( chr(240) . chr(159) . chr(144) . chr(152), 100
 ) ); // 100
 echo    strlen( str_repeat( chr(240) . chr(159) . chr(144) . chr(152), 100
 ) ); // 400
 }}}

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


More information about the wp-trac mailing list