Make WordPress Core

Changeset 39796


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

Multisite: Use wp_rand() in signup key creation.

Merges [39795] to the 4.7 branch.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

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

    r39323 r39796  
    670670    global $wpdb;
    671671
    672     $key = substr( md5( time() . rand() . $domain ), 0, 16 );
     672    $key = substr( md5( time() . wp_rand() . $domain ), 0, 16 );
    673673    $meta = serialize($meta);
    674674
     
    720720    $user = preg_replace( '/\s+/', '', sanitize_user( $user, true ) );
    721721    $user_email = sanitize_email( $user_email );
    722     $key = substr( md5( time() . rand() . $user_email ), 0, 16 );
     722    $key = substr( md5( time() . wp_rand() . $user_email ), 0, 16 );
    723723    $meta = serialize($meta);
    724724
Note: See TracChangeset for help on using the changeset viewer.