WordPress.org

Make WordPress Core

Changeset 39795 for trunk


Ignore:
Timestamp:
01/11/2017 05:29:20 AM (3 years ago)
Author:
jeremyfelt
Message:

Multisite: Use wp_rand() in signup key creation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r39639 r39795  
    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.