X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fpassword%2FMWOldPassword.php;h=c48b6e61d57e32a4d98b8b709e27af53842107a4;hp=84675c16d682c6c083951f4afab26a4ef0d5894d;hb=4260b0f8a9bb89d92c39a61d8c48a31007b7240f;hpb=8b9584646bc8989439d6d058dfccb93b5d02265c 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 = [];