Make WordPress Core

Ticket #36422: 36422.diff

File 36422.diff, 799 bytes (added by pento, 8 years ago)
  • src/wp-admin/setup-config.php

     
    278278        if ( ! empty( $wpdb->error ) )
    279279                wp_die( $wpdb->error->get_error_message() . $tryagain_link );
    280280
     281        $wpdb->query( "SELECT $prefix" );
     282        if ( ! $wpdb->last_error ) {
     283                // MySQL was able to parse the prefix as a value, which we don't want. Bail.
     284                wp_die( __( '<strong>ERROR</strong>: "Table Prefix" is invalid.' ) );
     285        }
     286
    281287        // Generate keys and salts using secure CSPRNG; fallback to API if enabled; further fallback to original wp_generate_password().
    282288        try {
    283289                $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_ []{}<>~`+=,.;:/?|';