Make WordPress Core

Changeset 40387


Ignore:
Timestamp:
04/06/2017 06:00:16 PM (8 years ago)
Author:
swissspidy
Message:

Load: Only load PasswordHash class when needed.

This reverts [38371] which loaded class-phpass.php early in wp-settings.php and in turn caused backward compatibility problems.

Props DavidAnderson, ketuchetan.
Fixes #39445.

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r40363 r40387  
    18061806    // Now insert the key, hashed, into the DB.
    18071807    if ( empty( $wp_hasher ) ) {
     1808        require_once ABSPATH . WPINC . '/class-phpass.php';
    18081809        $wp_hasher = new PasswordHash( 8, true );
    18091810    }
     
    20862087
    20872088    if ( empty($wp_hasher) ) {
     2089        require_once( ABSPATH . WPINC . '/class-phpass.php');
    20882090        // By default, use the portable hash from phpass
    20892091        $wp_hasher = new PasswordHash(8, true);
     
    21452147    // new style phpass portable hash.
    21462148    if ( empty($wp_hasher) ) {
     2149        require_once( ABSPATH . WPINC . '/class-phpass.php');
    21472150        // By default, use the portable hash from phpass
    21482151        $wp_hasher = new PasswordHash(8, true);
  • trunk/src/wp-includes/post-template.php

    r40042 r40387  
    794794    }
    795795
     796    require_once ABSPATH . WPINC . '/class-phpass.php';
    796797    $hasher = new PasswordHash( 8, true );
    797798
  • trunk/src/wp-includes/user.php

    r39600 r40387  
    21222122    // Now insert the key, hashed, into the DB.
    21232123    if ( empty( $wp_hasher ) ) {
     2124        require_once ABSPATH . WPINC . '/class-phpass.php';
    21242125        $wp_hasher = new PasswordHash( 8, true );
    21252126    }
     
    21662167
    21672168    if ( empty( $wp_hasher ) ) {
     2169        require_once ABSPATH . WPINC . '/class-phpass.php';
    21682170        $wp_hasher = new PasswordHash( 8, true );
    21692171    }
  • trunk/src/wp-login.php

    r40048 r40387  
    439439    }
    440440
     441    require_once ABSPATH . WPINC . '/class-phpass.php';
    441442    $hasher = new PasswordHash( 8, true );
    442443
  • trunk/src/wp-settings.php

    r39369 r40387  
    101101require( ABSPATH . WPINC . '/class-wp-error.php' );
    102102require( ABSPATH . WPINC . '/pomo/mo.php' );
    103 require( ABSPATH . WPINC . '/class-phpass.php' );
    104103
    105104// Include the wpdb class and, if present, a db.php database drop-in.
Note: See TracChangeset for help on using the changeset viewer.