Skip to content

Commit

Permalink
Multisite: Use wp_rand() in signup key creation.
Browse files Browse the repository at this point in the history
Built from https://develop.svn.wordpress.org/trunk@39795


git-svn-id: http://core.svn.wordpress.org/trunk@39733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
jeremyfelt committed Jan 11, 2017
1 parent 061e878 commit cea9e2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions wp-includes/ms-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() ) {
global $wpdb;

$key = substr( md5( time() . rand() . $domain ), 0, 16 );
$key = substr( md5( time() . wp_rand() . $domain ), 0, 16 );
$meta = serialize($meta);

$wpdb->insert( $wpdb->signups, array(
Expand Down Expand Up @@ -719,7 +719,7 @@ function wpmu_signup_user( $user, $user_email, $meta = array() ) {
// Format data
$user = preg_replace( '/\s+/', '', sanitize_user( $user, true ) );
$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);

$wpdb->insert( $wpdb->signups, array(
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-39772';
$wp_version = '4.8-alpha-39795';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit cea9e2d

Please sign in to comment.