Multisite: Use `wp_rand()` in signup key creation.
Merges [39795] to the 4.7 branch. Built from https://develop.svn.wordpress.org/branches/4.7@39796 git-svn-id: http://core.svn.wordpress.org/branches/4.7@39734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
31c9a63bfb
commit
871bb10c9a
|
@ -669,7 +669,7 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
|
||||||
function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = array() ) {
|
function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = array() ) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
$key = substr( md5( time() . rand() . $domain ), 0, 16 );
|
$key = substr( md5( time() . wp_rand() . $domain ), 0, 16 );
|
||||||
$meta = serialize($meta);
|
$meta = serialize($meta);
|
||||||
|
|
||||||
$wpdb->insert( $wpdb->signups, array(
|
$wpdb->insert( $wpdb->signups, array(
|
||||||
|
@ -719,7 +719,7 @@ function wpmu_signup_user( $user, $user_email, $meta = array() ) {
|
||||||
// Format data
|
// Format data
|
||||||
$user = preg_replace( '/\s+/', '', sanitize_user( $user, true ) );
|
$user = preg_replace( '/\s+/', '', sanitize_user( $user, true ) );
|
||||||
$user_email = sanitize_email( $user_email );
|
$user_email = sanitize_email( $user_email );
|
||||||
$key = substr( md5( time() . rand() . $user_email ), 0, 16 );
|
$key = substr( md5( time() . wp_rand() . $user_email ), 0, 16 );
|
||||||
$meta = serialize($meta);
|
$meta = serialize($meta);
|
||||||
|
|
||||||
$wpdb->insert( $wpdb->signups, array(
|
$wpdb->insert( $wpdb->signups, array(
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7.1-RC1-39783';
|
$wp_version = '4.7.1-RC1-39796';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue