[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
Wed May 16 10:36:43 UTC 2018


#44107: wp_insert_user should return WP_Error if user_url's length is too long
--------------------------+-----------------------------
 Reporter:  tszming       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Just like the user_nicename checking

 Consider the test below

 {{{

 public function
 test_wp_insert_user_should_reject_user_url_over_100_characters() {
     $user_url = str_repeat( 'a', 101 );

     $u             = wp_insert_user(
         array(
             'user_login'    => 'test',
             'user_email'    =>  'test at example.com',
             'user_pass'     => 'password',
             'user_url' => $user_url,
         )
     );

     $this->assertWPError( $u );
 }
 }}}

 This also apply to the function `wp_update_user`

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


More information about the wp-trac mailing list