Ticket #19599: 19599.4.patch
| File 19599.4.patch, 1.9 KB (added by SergeyBiryukov, 18 months ago) |
|---|
-
wp-includes/default-constants.php
140 140 * @since 3.0.0 141 141 */ 142 142 function wp_cookie_constants( ) { 143 global $wp_default_secret_key;144 145 143 /** 146 144 * Used to guarantee unique hash cookies 147 145 * @since 1.5 … … 155 153 } 156 154 157 155 /** 158 * Should be exactly the same as the default value of SECRET_KEY in wp-config-sample.php159 * @since 2.5.0160 */161 $wp_default_secret_key = 'put your unique phrase here';162 163 /**164 156 * @since 2.0.0 165 157 */ 166 158 if ( !defined('USER_COOKIE') ) -
wp-includes/pluggable.php
1313 1313 * @return string Salt value 1314 1314 */ 1315 1315 function wp_salt($scheme = 'auth') { 1316 global $wp_default_secret_key; 1316 $secret_keys = array(); 1317 1318 if ( defined( 'AUTH_KEY' ) ) 1319 $secret_keys[] = AUTH_KEY; 1320 if ( defined( 'SECURE_AUTH_KEY' ) ) 1321 $secret_keys[] = SECURE_AUTH_KEY; 1322 if ( defined( 'LOGGED_IN_KEY' ) ) 1323 $secret_keys[] = LOGGED_IN_KEY; 1324 if ( defined( 'NONCE_KEY' ) ) 1325 $secret_keys[] = NONCE_KEY; 1326 if ( defined( 'AUTH_SALT' ) ) 1327 $secret_keys[] = AUTH_SALT; 1328 if ( defined( 'SECURE_AUTH_SALT' ) ) 1329 $secret_keys[] = SECURE_AUTH_SALT; 1330 if ( defined( 'LOGGED_IN_SALT' ) ) 1331 $secret_keys[] = LOGGED_IN_SALT; 1332 if ( defined( 'NONCE_SALT' ) ) 1333 $secret_keys[] = NONCE_SALT; 1334 1335 $wp_default_secret_key = ''; 1336 $secret_keys_diff = array_diff_assoc( $secret_keys, array_unique( $secret_keys ) ); 1337 if ( !empty( $secret_keys_diff ) ) 1338 $wp_default_secret_key = array_shift( $secret_keys_diff ); 1339 1317 1340 $secret_key = ''; 1318 1341 if ( defined('SECRET_KEY') && ('' != SECRET_KEY) && ( $wp_default_secret_key != SECRET_KEY) ) 1319 1342 $secret_key = SECRET_KEY;