WordPress.org

Make WordPress Core

Opened 5 weeks ago

#44107 new defect (bug)

wp_insert_user should return WP_Error if user_url's length is too long

Reported by: tszming Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

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@example.com',
            'user_pass'     => 'password',
            'user_url' => $user_url,
        )
    );

    $this->assertWPError( $u );
}

This also apply to the function wp_update_user

Change History (0)

Note: See TracTickets for help on using tickets.