Changeset 41782 for trunk/src/wp-login.php
- Timestamp:
- 10/06/2017 05:36:12 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-login.php
r41692 r41782 299 299 $errors = new WP_Error(); 300 300 301 if ( empty( $_POST['user_login'] ) ) {301 if ( empty( $_POST['user_login'] ) || ! is_string( $_POST['user_login'] ) ) { 302 302 $errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or email address.')); 303 303 } elseif ( strpos( $_POST['user_login'], '@' ) ) { … … 566 566 login_header(__('Lost Password'), '<p class="message">' . __('Please enter your username or email address. You will receive a link to create a new password via email.') . '</p>', $errors); 567 567 568 $user_login = isset($_POST['user_login']) ? wp_unslash($_POST['user_login']) : ''; 568 $user_login = ''; 569 570 if ( isset( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) { 571 $user_login = wp_unslash( $_POST['user_login'] ); 572 } 569 573 570 574 ?> … … 758 762 $user_login = ''; 759 763 $user_email = ''; 764 760 765 if ( $http_post ) { 761 $user_login = isset( $_POST['user_login'] ) ? $_POST['user_login'] : ''; 762 $user_email = isset( $_POST['user_email'] ) ? wp_unslash( $_POST['user_email'] ) : ''; 766 if ( isset( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) { 767 $user_login = $_POST['user_login']; 768 } 769 770 if ( isset( $_POST['user_email'] ) && is_string( $_POST['user_email'] ) ) { 771 $user_email = wp_unslash( $_POST['user_email'] ); 772 } 773 763 774 $errors = register_new_user($user_login, $user_email); 764 775 if ( !is_wp_error($errors) ) {
Note: See TracChangeset
for help on using the changeset viewer.