Make WordPress Core


Ignore:
Timestamp:
11/20/2014 04:04:26 PM (11 years ago)
Author:
nacin
Message:

Prevent high resource usage when hashing large passwords. props mdawaffe, pento

Merges [30466] to the 4.0 branch.

Location:
branches/4.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0

  • branches/4.0/src/wp-includes/class-phpass.php

    r26868 r30467  
    215215    function HashPassword($password)
    216216    {
     217        if ( strlen( $password ) > 4096 ) {
     218            return '*';
     219        }
     220
    217221        $random = '';
    218222
     
    250254    function CheckPassword($password, $stored_hash)
    251255    {
     256        if ( strlen( $password ) > 4096 ) {
     257            return false;
     258        }
     259
    252260        $hash = $this->crypt_private($password, $stored_hash);
    253261        if ($hash[0] == '*')
Note: See TracChangeset for help on using the changeset viewer.