From c8852cc909223fb9fc946523a998344ef8943acc Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 29 Jun 2014 22:12:16 +0000 Subject: [PATCH] Use the `WPINC` constant when loading `class-phpass.php` Props wojtek.szkutnik See #14157. Built from https://develop.svn.wordpress.org/trunk@28903 git-svn-id: http://core.svn.wordpress.org/trunk@28702 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 4 ++-- wp-includes/post-template.php | 2 +- wp-includes/user.php | 2 +- wp-login.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 4ccafe6f1d..2715a32be5 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -1860,7 +1860,7 @@ function wp_hash_password($password) { global $wp_hasher; if ( empty($wp_hasher) ) { - require_once( ABSPATH . 'wp-includes/class-phpass.php'); + require_once( ABSPATH . WPINC . '/class-phpass.php'); // By default, use the portable hash from phpass $wp_hasher = new PasswordHash(8, true); } @@ -1918,7 +1918,7 @@ function wp_check_password($password, $hash, $user_id = '') { // If the stored hash is longer than an MD5, presume the // new style phpass portable hash. if ( empty($wp_hasher) ) { - require_once( ABSPATH . 'wp-includes/class-phpass.php'); + require_once( ABSPATH . WPINC . '/class-phpass.php'); // By default, use the portable hash from phpass $wp_hasher = new PasswordHash(8, true); } diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index ee59727278..0c63083334 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -694,7 +694,7 @@ function post_password_required( $post = null ) { if ( ! isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) ) return true; - require_once ABSPATH . 'wp-includes/class-phpass.php'; + require_once ABSPATH . WPINC . '/class-phpass.php'; $hasher = new PasswordHash( 8, true ); $hash = wp_unslash( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] ); diff --git a/wp-includes/user.php b/wp-includes/user.php index a548f5aaee..11972642ec 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -2003,7 +2003,7 @@ function check_password_reset_key($key, $login) { return new WP_Error('invalid_key', __('Invalid key')); if ( empty( $wp_hasher ) ) { - require_once ABSPATH . 'wp-includes/class-phpass.php'; + require_once ABSPATH . WPINC . '/class-phpass.php'; $wp_hasher = new PasswordHash( 8, true ); } diff --git a/wp-login.php b/wp-login.php index 33ab94b141..257655891b 100644 --- a/wp-login.php +++ b/wp-login.php @@ -348,7 +348,7 @@ function retrieve_password() { // Now insert the key, hashed, into the DB. if ( empty( $wp_hasher ) ) { - require_once ABSPATH . 'wp-includes/class-phpass.php'; + require_once ABSPATH . WPINC . '/class-phpass.php'; $wp_hasher = new PasswordHash( 8, true ); } $hashed = $wp_hasher->HashPassword( $key ); @@ -450,7 +450,7 @@ $interim_login = isset($_REQUEST['interim-login']); switch ($action) { case 'postpass' : - require_once ABSPATH . 'wp-includes/class-phpass.php'; + require_once ABSPATH . WPINC . '/class-phpass.php'; $hasher = new PasswordHash( 8, true ); /**