Skip to content

Commit 558abe3

Browse files
committed
Multisite: Use wp_rand() in signup key creation.
Merges [39795] to the 3.7 branch. git-svn-id: https://develop.svn.wordpress.org/branches/3.7@39806 602fd350-edb4-49c9-b593-d223f7449a82
1 parent e309f96 commit 558abe3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/ms-functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ function wpmu_validate_blog_signup($blogname, $blog_title, $user = '') {
631631
function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = array() ) {
632632
global $wpdb;
633633

634-
$key = substr( md5( time() . rand() . $domain ), 0, 16 );
634+
$key = substr( md5( time() . wp_rand() . $domain ), 0, 16 );
635635
$meta = serialize($meta);
636636

637637
$wpdb->insert( $wpdb->signups, array(
@@ -667,7 +667,7 @@ function wpmu_signup_user( $user, $user_email, $meta = array() ) {
667667
// Format data
668668
$user = preg_replace( '/\s+/', '', sanitize_user( $user, true ) );
669669
$user_email = sanitize_email( $user_email );
670-
$key = substr( md5( time() . rand() . $user_email ), 0, 16 );
670+
$key = substr( md5( time() . wp_rand() . $user_email ), 0, 16 );
671671
$meta = serialize($meta);
672672

673673
$wpdb->insert( $wpdb->signups, array(

0 commit comments

Comments
 (0)