X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=blobdiff_plain;f=includes%2Fpassword%2FMWSaltedPassword.php;h=733984cfd793e3ef8fb874dc3d6e0697d1e329a6;hb=537bc1df7d20002d05667436a9b21dc2e43a6927;hp=6c6895a2bdad2fa5545e0a298a9d0bdc52cdb9f6;hpb=6b1a173f07f1a04188735f4688ce6335da14c3b7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/password/MWSaltedPassword.php b/includes/password/MWSaltedPassword.php index 6c6895a2bd..733984cfd7 100644 --- a/includes/password/MWSaltedPassword.php +++ b/includes/password/MWSaltedPassword.php @@ -1,6 +1,6 @@ hash = md5( $this->args[0] . '-' . md5( $plaintext ) ); + + if ( !is_string( $this->hash ) || strlen( $this->hash ) < 32 ) { + throw new PasswordError( 'Error when hashing password.' ); + } } }