Changeset 55397
- Timestamp:
- 02/21/2023 03:57:36 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-recovery-mode-key-service.php
r54133 r55397 86 86 * @since 5.2.0 87 87 * 88 * @global PasswordHash $wp_hasher 89 * 88 90 * @param string $token The token used when generating the given key. 89 91 * @param string $key The unhashed key. … … 92 94 */ 93 95 public function validate_recovery_mode_key( $token, $key, $ttl ) { 96 global $wp_hasher; 94 97 95 98 $records = $this->get_keys(); … … 107 110 } 108 111 109 if ( ! wp_check_password( $key, $record['hashed_key'] ) ) { 112 if ( empty( $wp_hasher ) ) { 113 require_once ABSPATH . WPINC . '/class-phpass.php'; 114 $wp_hasher = new PasswordHash( 8, true ); 115 } 116 117 if ( ! $wp_hasher->CheckPassword( $key, $record['hashed_key'] ) ) { 110 118 return new WP_Error( 'hash_mismatch', __( 'Invalid recovery key.' ) ); 111 119 }
Note: See TracChangeset
for help on using the changeset viewer.