Make WordPress Core

Changeset 3731 for trunk/wp-login.php


Ignore:
Timestamp:
04/20/2006 09:44:14 PM (20 years ago)
Author:
ryan
Message:

Shorten key and action name to avoid long links that break in mail clients.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r3565 r3731  
    102102
    103103    // Generate something random for a password... md5'ing current time with a rand salt
    104     $key = substr( md5( uniqid( microtime() ) ), 0, 50);
     104    $key = substr( md5( uniqid( microtime() ) ), 0, 8);
    105105    // now insert the new pass md5'd into the db
    106106    $wpdb->query("UPDATE $wpdb->users SET user_activation_key = '$key' WHERE user_login = '$user_login'");
     
    109109    $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
    110110    $message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n";
    111     $message .= get_settings('siteurl') . "/wp-login.php?action=resetpass&key=$key\r\n";
     111    $message .= get_settings('siteurl') . "/wp-login.php?action=rp&key=$key\r\n";
    112112
    113113    $m = wp_mail($user_email, sprintf(__('[%s] Password Reset'), get_settings('blogname')), $message);
     
    126126
    127127case 'resetpass' :
    128 
     128case 'rp' :
    129129    // Generate something random for a password... md5'ing current time with a rand salt
    130130    $key = preg_replace('/a-z0-9/i', '', $_GET['key']);
Note: See TracChangeset for help on using the changeset viewer.