Make WordPress Core

Changeset 39798


Ignore:
Timestamp:
01/11/2017 05:31:14 AM (8 years ago)
Author:
jeremyfelt
Message:

Multisite: Use wp_rand() in signup key creation.

Merges [39795] to the 4.5 branch.

Location:
branches/4.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.5

  • branches/4.5/src/wp-includes/ms-functions.php

    r36895 r39798  
    667667    global $wpdb;
    668668
    669     $key = substr( md5( time() . rand() . $domain ), 0, 16 );
     669    $key = substr( md5( time() . wp_rand() . $domain ), 0, 16 );
    670670    $meta = serialize($meta);
    671671
     
    717717    $user = preg_replace( '/\s+/', '', sanitize_user( $user, true ) );
    718718    $user_email = sanitize_email( $user_email );
    719     $key = substr( md5( time() . rand() . $user_email ), 0, 16 );
     719    $key = substr( md5( time() . wp_rand() . $user_email ), 0, 16 );
    720720    $meta = serialize($meta);
    721721
Note: See TracChangeset for help on using the changeset viewer.