Make WordPress Core

Changeset 1990


Ignore:
Timestamp:
12/22/2004 02:41:32 AM (21 years ago)
Author:
saxmatt
Message:

Make reset passwords use the same randomness we do in install.php. Hat tip: swoolley.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r1983 r1990  
    8181
    8282    // Generate something random for a password... md5'ing current time with a rand salt
    83     $user_pass = substr( MD5('time' . rand(1, 16000) ), 0, 6);
     83    $user_pass = substr(md5(uniqid(microtime())), 0, 6);
    8484    // now insert the new pass md5'd into the db
    8585    $wpdb->query("UPDATE $wpdb->users SET user_pass = MD5('$user_pass') WHERE user_login = '$user_login'");
Note: See TracChangeset for help on using the changeset viewer.