From 7c597dc1758a79692abfc991e89d3a4f1264efd7 Mon Sep 17 00:00:00 2001 From: mklute101 Date: Tue, 17 Sep 2024 15:58:10 -0700 Subject: [PATCH] remove check for slash, as it seems to be allowed and caused this test failure 1) WP_Test_REST_Users_Controller::test_user_roundtrip_as_editor Failed asserting that 500 is identical to 200. --- src/wp-includes/user.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index ac02e5586b77d..dc7aac5a027a3 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -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 ); }