X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpassword%2FMWOldPassword.php;h=c48b6e61d57e32a4d98b8b709e27af53842107a4;hb=02dc5d8685bf9ceccdbcdba75ed3a4c920da0e80;hp=84675c16d682c6c083951f4afab26a4ef0d5894d;hpb=eaae000bd6a9ba542ed2fb3d0f9a8d78be3a8db6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/password/MWOldPassword.php b/includes/password/MWOldPassword.php index 84675c16d6..c48b6e61d5 100644 --- a/includes/password/MWOldPassword.php +++ b/includes/password/MWOldPassword.php @@ -36,9 +36,11 @@ class MWOldPassword extends ParameterizedPassword { } public function crypt( $plaintext ) { - global $wgPasswordSalt; - - if ( $wgPasswordSalt && count( $this->args ) === 1 ) { + if ( count( $this->args ) === 1 ) { + // Accept (but do not generate) salted passwords with :A: prefix. + // These are actually B-type passwords, but an error in a previous + // version of MediaWiki caused them to be written with an :A: + // prefix. $this->hash = md5( $this->args[0] . '-' . md5( $plaintext ) ); } else { $this->args = [];