Make WordPress Core


Ignore:
Timestamp:
10/04/2022 03:57:29 AM (21 months ago)
Author:
peterwilsoncc
Message:

Security: Additional translations of salt default phrase.

Translate the default salt value "put your unique phrase here" in additional locations in which it is used. This further ensures that the default phrase is considered an error in non-english translations of wp-config.php.

Follow-up to [54249].

Props peterwilsoncc, audrasjb, JeffPaul.
Fixes #55937.

File:
1 edited

Legend:

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

    r54249 r54379  
    3838    echo "</p><p><code>define('WP_ALLOW_REPAIR', true);</code></p>";
    3939
    40     $default_key     = __( 'put your unique phrase here' );
     40    $default_keys    = array_unique(
     41        array(
     42            'put your unique phrase here',
     43            /*
     44             * translators: This string should only be translated if wp-config-sample.php is localized.
     45             * You can check the localized release package or
     46             * https://i18n.svn.wordpress.org/<locale code>/branches/<wp version>/dist/wp-config-sample.php
     47             */
     48            __( 'put your unique phrase here' ),
     49        )
     50    );
    4151    $missing_key     = false;
    4252    $duplicated_keys = array();
     
    5262    }
    5363
    54     // If at least one key uses the default value, consider it duplicated.
    55     if ( isset( $duplicated_keys[ $default_key ] ) ) {
    56         $duplicated_keys[ $default_key ] = true;
     64    // If at least one key uses a default value, consider it duplicated.
     65    foreach ( $default_keys as $default_key ) {
     66        if ( isset( $duplicated_keys[ $default_key ] ) ) {
     67            $duplicated_keys[ $default_key ] = true;
     68        }
    5769    }
    5870
Note: See TracChangeset for help on using the changeset viewer.