WordPress.org

Make WordPress Core

Ticket #42766: 42766.patch

File 42766.patch, 3.6 KB (added by ronakganatra, 4 years ago)

As pe my testing this code is working fine.

  • src/wp-admin/includes/user.php

     src/wp-admin/includes/class-core-upgrader.php         | 0
     src/wp-admin/includes/class-wp-automatic-updater.php  | 0
     src/wp-admin/includes/class-wp-plugins-list-table.php | 0
     src/wp-admin/includes/class-wp-upgrader.php           | 0
     src/wp-admin/includes/deprecated.php                  | 0
     src/wp-admin/includes/file.php                        | 0
     src/wp-admin/includes/network.php                     | 0
     src/wp-admin/includes/plugin.php                      | 0
     src/wp-admin/includes/update-core.php                 | 0
     src/wp-admin/includes/user.php                        | 4 ++--
     src/wp-admin/js/customize-controls.js                 | 0
     src/wp-admin/js/editor-expand.js                      | 0
     src/wp-admin/js/editor.js                             | 0
     src/wp-admin/js/post.js                               | 0
     src/wp-admin/options-media.php                        | 0
     src/wp-admin/options.php                              | 0
     src/wp-admin/theme-install.php                        | 0
     src/wp-content/themes/twentyseventeen/front-page.php  | 0
     src/wp-content/themes/twentyseventeen/page.php        | 1 +
     src/wp-content/themes/twentyseventeen/single.php      | 1 -
     src/wp-includes/cache.php                             | 0
     src/wp-includes/class-wp-editor.php                   | 0
     src/wp-includes/class-wp-theme.php                    | 0
     src/wp-includes/default-constants.php                 | 0
     src/wp-includes/functions.php                         | 0
     src/wp-includes/js/autosave.js                        | 0
     src/wp-includes/js/mce-view.js                        | 0
     src/wp-includes/l10n.php                              | 0
     src/wp-includes/load.php                              | 0
     src/wp-includes/media.php                             | 0
     src/wp-includes/ms-default-constants.php              | 0
     src/wp-includes/ms-functions.php                      | 0
     src/wp-includes/ms-load.php                           | 0
     src/wp-includes/plugin.php                            | 0
     src/wp-includes/post.php                              | 0
     src/wp-includes/theme.php                             | 0
     src/wp-includes/wp-db.php                             | 0
     src/wp-load.php                                       | 0
     38 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/wp-admin/includes/user.php b/src/wp-admin/includes/user.php
    index 269d64fb26..fbd0c0fa82 100644
    a b function edit_user( $user_id = 0 ) { 
    4545
    4646        $pass1 = $pass2 = '';
    4747        if ( isset( $_POST['pass1'] ) ) {
    48                 $pass1 = $_POST['pass1'];
     48                $pass1 = trim($_POST['pass1']);
    4949        }
    5050        if ( isset( $_POST['pass2'] ) ) {
    51                 $pass2 = $_POST['pass2'];
     51                $pass2 = trim($_POST['pass2']);
    5252        }
    5353
    5454        if ( isset( $_POST['role'] ) && current_user_can( 'edit_users' ) ) {
  • src/wp-content/themes/twentyseventeen/page.php

    diff --git a/src/wp-content/themes/twentyseventeen/page.php b/src/wp-content/themes/twentyseventeen/page.php
    index 5d42e2ce48..560ebafcbf 100644
    a b get_header(); ?> 
    2222                <main id="main" class="site-main" role="main">
    2323
    2424                        <?php
     25
    2526                        while ( have_posts() ) :
    2627                                the_post();
    2728
  • src/wp-content/themes/twentyseventeen/single.php

    diff --git a/src/wp-content/themes/twentyseventeen/single.php b/src/wp-content/themes/twentyseventeen/single.php
    index b5136a2133..1f7db05167 100644
    a b  
    1111 */
    1212
    1313get_header(); ?>
    14 
    1514<div class="wrap">
    1615        <div id="primary" class="content-area">
    1716                <main id="main" class="site-main" role="main">