Make WordPress Core


Ignore:
Timestamp:
04/30/2010 03:25:54 PM (12 years ago)
Author:
nacin
Message:

Clean up secret_salt_warning. Use stronger version of wp_generate_password. Shrink line-height of #update-nag so multiple-line messages don't look so awful, use padding instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ms.php

    r14243 r14318  
    661661    if ( !is_super_admin() )
    662662        return;
    663     $secret_keys = array( 'NONCE_KEY', 'NONCE_SALT', 'AUTH_KEY', 'AUTH_SALT', 'LOGGED_IN_KEY', 'LOGGED_IN_SALT', 'SECURE_AUTH_KEY', 'SECURE_AUTH_SALT' );
     663    $secret_keys = array( 'AUTH_KEY', 'SECURE_KEY', 'LOGGED_IN_KEY', 'NONCE_KEY', 'AUTH_SALT', 'SECURE_SALT', 'LOGGED_IN_SALT', 'NONCE_SALT' );
    664664    $out = '';
    665665    foreach( $secret_keys as $key ) {
    666         if ( !defined( $key ) )
    667             $out .= "define( '$key', '" . wp_generate_password() . wp_generate_password() . "' );<br />";
     666        if ( ! defined( $key ) )
     667            $out .= "define( '$key', '" . esc_html( wp_generate_password( 64, true, true ) ) . "' );<br />";
    668668    }
    669669    if ( $out != '' ) {
    670         $msg = sprintf( __( 'Warning! WordPress encrypts user cookies, but you must add the following lines to <strong>%swp-config.php</strong> for it to be more secure.<br />Please add the code before the line, <code>/* That\'s all, stop editing! Happy blogging. */</code>' ), ABSPATH );
    671         $msg .= "<blockquote>$out</blockquote>";
     670        $msg  = __( 'Warning! WordPress encrypts user cookies, but you must add the following lines to <strong>wp-config.php</strong> for it to be more secure.' );
     671        $msg .= '<br/>' . __( "Before the line <code>/* That's all, stop editing! Happy blogging. */</code> please add this code:" );
     672        $msg .= "<br/><br/><code>$out</code>";
    672673
    673674        echo "<div id='update-nag'>$msg</div>";
Note: See TracChangeset for help on using the changeset viewer.