mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Multisite: Use wp_rand()
in signup key creation.
Merges [39795] to the 4.5 branch. git-svn-id: https://develop.svn.wordpress.org/branches/4.5@39798 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
104f0b2a6d
commit
e1cba619ea
@ -666,7 +666,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(
|
||||
@ -716,7 +716,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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user