WordPress 4.1.1-scripts
[autoinstalls/wordpress.git] / wp-includes / class-phpass.php
index 1970ae9da49df37083b19f27db3cc4f428c04f00..f2dadae3ff2fbacd1cb319410bcdaceb30235606 100644 (file)
@@ -214,6 +214,10 @@ class PasswordHash {
 
        function HashPassword($password)
        {
+               if ( strlen( $password ) > 4096 ) {
+                       return '*';
+               }
+
                $random = '';
 
                if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) {
@@ -249,6 +253,10 @@ class PasswordHash {
 
        function CheckPassword($password, $stored_hash)
        {
+               if ( strlen( $password ) > 4096 ) {
+                       return false;
+               }
+
                $hash = $this->crypt_private($password, $stored_hash);
                if ($hash[0] == '*')
                        $hash = crypt($password, $stored_hash);