WordPress.org

Make WordPress Core

Ticket #5367: secret_key.diff

File secret_key.diff, 1.0 KB (added by ryan, 8 years ago)

Add SECRET_KEY to salt

  • wp-includes/pluggable.php

     
    697697        if ( empty($salt) ) 
    698698                $salt = DB_PASSWORD . DB_USER . DB_NAME . DB_HOST . ABSPATH; 
    699699 
    700         return $salt; 
     700        if ( ! defined('SECRET_KEY') ) 
     701                $secret_key = 'shhhh'; 
     702        else 
     703                $secret_key = SECRET_KEY; 
     704                 
     705        return $salt . $secret_key; 
    701706} 
    702707endif; 
    703708 
  • wp-config-sample.php

     
    66define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value 
    77define('DB_CHARSET', 'utf8'); 
    88define('DB_COLLATE', ''); 
     9define('SECRET_KEY', 'shhhh'); // Change this to something unique 
    910 
    1011// You can have multiple installations in one database if you give each a unique prefix 
    1112$table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!