Make WordPress Core

Changeset 13206


Ignore:
Timestamp:
02/19/2010 12:03:36 AM (15 years ago)
Author:
nacin
Message:

Allow more special characters in wp_generate_password() second pass. props sivel, see #12159

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r13204 r13206  
    14631463 * @param int $length The length of password to generate
    14641464 * @param bool $special_chars Whether to include standard special characters. Default true.
    1465  * @param bool $extra_special_chars Whether to include more special characters. Used
    1466  *   when generating secret keys and salts. Default false.
     1465 * @param bool $extra_special_chars Whether to include other special characters. Used when
     1466 *   generating secret keys and salts. Default false.
    14671467 * @return string The random password
    14681468 **/
    14691469function wp_generate_password( $length = 12, $special_chars = true, $extra_special_chars = false ) {
    14701470    $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
    1471     if ( $special_chars ) {
     1471    if ( $special_chars )
    14721472        $chars .= '!@#$%^&*()';
    1473         if ( $extra_special_chars )
    1474             $chars .= '-_ []{}<>~`+=,.;:/?|';
    1475     }
     1473    if ( $extra_special_chars )
     1474        $chars .= '-_ []{}<>~`+=,.;:/?|';
    14761475
    14771476    $password = '';
Note: See TracChangeset for help on using the changeset viewer.