diff --git a/.gitignore b/.gitignore
index e4d192e0ef..55410a124c 100644
a
|
b
|
wp-tests-config.php |
72 | 72 | *.diff |
73 | 73 | .svn |
74 | 74 | !/src/js/_enqueues/vendor |
| 75 | /nbproject/private/ |
| 76 | No newline at end of file |
diff --git a/src/wp-admin/includes/user.php b/src/wp-admin/includes/user.php
index 558ff24970..7d98c82d5d 100644
a
|
b
|
function edit_user( $user_id = 0 ) { |
41 | 41 | } |
42 | 42 | |
43 | 43 | if ( ! $update && isset( $_POST['user_login'] ) ) { |
44 | | $user->user_login = sanitize_user( $_POST['user_login'], true ); |
| 44 | $user->user_login = sanitize_user( wp_unslash( $_POST['user_login'] ), true ); |
45 | 45 | } |
46 | 46 | |
47 | 47 | $pass1 = $pass2 = ''; |
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index 3819f21f6f..91851cb657 100644
a
|
b
|
function wp_signon( $credentials = array(), $secure_cookie = '' ) { |
35 | 35 | $credentials = array(); // Back-compat for plugins passing an empty string. |
36 | 36 | |
37 | 37 | if ( ! empty( $_POST['log'] ) ) { |
38 | | $credentials['user_login'] = $_POST['log']; |
| 38 | $credentials['user_login'] = wp_unslash( $_POST['log'] ); |
39 | 39 | } |
40 | 40 | if ( ! empty( $_POST['pwd'] ) ) { |
41 | 41 | $credentials['user_password'] = $_POST['pwd']; |
diff --git a/src/wp-login.php b/src/wp-login.php
index d9b2554783..e2d49f3d63 100644
a
|
b
|
switch ( $action ) { |
796 | 796 | |
797 | 797 | if ( $http_post ) { |
798 | 798 | if ( isset( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) { |
799 | | $user_login = $_POST['user_login']; |
| 799 | $user_login = wp_unslash( $_POST['user_login']); |
800 | 800 | } |
801 | 801 | |
802 | 802 | if ( isset( $_POST['user_email'] ) && is_string( $_POST['user_email'] ) ) { |
… |
… |
switch ( $action ) { |
904 | 904 | |
905 | 905 | // If the user wants SSL but the session is not SSL, force a secure cookie. |
906 | 906 | if ( ! empty( $_POST['log'] ) && ! force_ssl_admin() ) { |
907 | | $user_name = sanitize_user( $_POST['log'] ); |
| 907 | $user_name = sanitize_user( wp_unslash( $_POST['log'] )); |
908 | 908 | $user = get_user_by( 'login', $user_name ); |
909 | 909 | |
910 | 910 | if ( ! $user && strpos( $user_name, '@' ) ) { |