Make WordPress Core

Changeset 59434


Ignore:
Timestamp:
11/20/2024 01:51:21 PM (11 days ago)
Author:
desrosj
Message:

Options, Meta APIs: Ensure duplicate salts are properly flagged.

Improvements were made in 6.7 to ensure that salts stored in the database were primed more efficiently.

The logic added to accomplish this suffered from an edge case where array indexes were unexpectedly missing when wp_salt() was called recursively.

Follow up to [58837].

Reviewed by davidbaumwald.
Merges [59427] to the 6.7 branch.

Props juliobox, ankitkumarshah, dilipbheda, johnbillion, joemcgill, desrosj.
Fixes #62424.

Location:
branches/6.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.7

  • branches/6.7/src/wp-includes/pluggable.php

    r59128 r59434  
    24802480        static $duplicated_keys;
    24812481        if ( null === $duplicated_keys ) {
    2482             $duplicated_keys = array(
    2483                 'put your unique phrase here' => true,
    2484             );
    2485 
    2486             /*
    2487              * translators: This string should only be translated if wp-config-sample.php is localized.
    2488              * You can check the localized release package or
    2489              * https://i18n.svn.wordpress.org/<locale code>/branches/<wp version>/dist/wp-config-sample.php
    2490              */
    2491             $duplicated_keys[ __( 'put your unique phrase here' ) ] = true;
     2482            $duplicated_keys = array();
    24922483
    24932484            foreach ( array( 'AUTH', 'SECURE_AUTH', 'LOGGED_IN', 'NONCE', 'SECRET' ) as $first ) {
     
    25002491                }
    25012492            }
     2493
     2494            $duplicated_keys['put your unique phrase here'] = true;
     2495
     2496            /*
     2497             * translators: This string should only be translated if wp-config-sample.php is localized.
     2498             * You can check the localized release package or
     2499             * https://i18n.svn.wordpress.org/<locale code>/branches/<wp version>/dist/wp-config-sample.php
     2500             */
     2501            $duplicated_keys[ __( 'put your unique phrase here' ) ] = true;
    25022502        }
    25032503
Note: See TracChangeset for help on using the changeset viewer.