]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-phpass.php
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)
        {
 
        function HashPassword($password)
        {
+               if ( strlen( $password ) > 4096 ) {
+                       return '*';
+               }
+
                $random = '';
 
                if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) {
                $random = '';
 
                if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) {
@@ -249,6 +253,10 @@ class PasswordHash {
 
        function CheckPassword($password, $stored_hash)
        {
 
        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);
                $hash = $this->crypt_private($password, $stored_hash);
                if ($hash[0] == '*')
                        $hash = crypt($password, $stored_hash);