Skip to content

Commit

Permalink
remove check for slash, as it seems to be allowed and caused this tes…
Browse files Browse the repository at this point in the history
…t failure

1) WP_Test_REST_Users_Controller::test_user_roundtrip_as_editor
Failed asserting that 500 is identical to 200.
  • Loading branch information
mklute101 committed Sep 17, 2024
1 parent 2a4dc77 commit 7c597dc
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/wp-includes/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -2150,10 +2150,6 @@ function wp_insert_user( $userdata ) {
return new WP_Error( 'empty_pre_hash_password', __( 'Cannot create a user with an empty password.' ) );
}

if ( str_contains( ( $pre_hash_password ), '\\' ) ) {
return new WP_Error( 'illegal_pre_hash_password', __( 'Passwords may not contain the character "\\".' ) );
}

// Hash the password.
$user_pass = wp_hash_password( $pre_hash_password );
}
Expand Down

0 comments on commit 7c597dc

Please sign in to comment.