Make WordPress Core

Changeset 54249


Ignore:
Timestamp:
09/20/2022 11:55:21 AM (2 years ago)
Author:
audrasjb
Message:

Security: Salting functions: translate the phrase "put your unique phrase here".

In wp_salt() WordPress pre-populates the check for duplicate salt values with the default put your unique phrase here. As the wp-config.php file for non-en_US can be translated in downloaded packages, a translated version of this phrase ought to be in the pre-populated duplicate values array too.

Props peterwilsoncc, SergeyBiryukov, whaze, costdev, audrasjb.
Fixes #55937.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/maint/repair.php

    r49750 r54249  
    3838    echo "</p><p><code>define('WP_ALLOW_REPAIR', true);</code></p>";
    3939
    40     $default_key     = 'put your unique phrase here';
     40    $default_key     = __( 'put your unique phrase here' );
    4141    $missing_key     = false;
    4242    $duplicated_keys = array();
  • trunk/src/wp-includes/class-wp-recovery-mode-cookie-service.php

    r54133 r54249  
    199199     */
    200200    private function recovery_mode_hash( $data ) {
    201         if ( ! defined( 'AUTH_KEY' ) || AUTH_KEY === 'put your unique phrase here' ) {
     201        if ( ! defined( 'AUTH_KEY' ) || AUTH_KEY === __( 'put your unique phrase here' ) ) {
    202202            $auth_key = get_site_option( 'recovery_mode_auth_key' );
    203203
  • trunk/src/wp-includes/pluggable.php

    r54218 r54249  
    24092409        static $duplicated_keys;
    24102410        if ( null === $duplicated_keys ) {
    2411             $duplicated_keys = array( 'put your unique phrase here' => true );
     2411            $duplicated_keys = array(
     2412                'put your unique phrase here'       => true,
     2413                /*
     2414                 * translators: This string should only be translated if wp-config-sample.php is localized.
     2415                 * You can check the localized release package or
     2416                 * https://i18n.svn.wordpress.org/<locale code>/branches/<wp version>/dist/wp-config-sample.php
     2417                 */
     2418                __( 'put your unique phrase here' ) => true,
     2419            );
    24122420            foreach ( array( 'AUTH', 'SECURE_AUTH', 'LOGGED_IN', 'NONCE', 'SECRET' ) as $first ) {
    24132421                foreach ( array( 'KEY', 'SALT' ) as $second ) {
Note: See TracChangeset for help on using the changeset viewer.