aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/TestUser.php
diff options
context:
space:
mode:
authorMarius Hoch <hoo@online.de>2014-10-20 01:54:16 +0200
committerMarius Hoch <hoo@online.de>2014-10-20 22:58:17 +0200
commitdd52464497213191a15f0b7ea11c4d20b77d707e (patch)
treeb8bc39a425de593847f78ef0ddb51f834a42dd75 /tests/phpunit/includes/TestUser.php
parentd50b4371a503e9281a2e82a0851ccc6de1ebd266 (diff)
downloadmediawikicore-dd52464497213191a15f0b7ea11c4d20b77d707e.tar.gz
mediawikicore-dd52464497213191a15f0b7ea11c4d20b77d707e.zip
Fix creating non-parameterized hashes in ParameterizedPassword
I noticed MWOldPassword is broken while working on I7024b287a7. When generating new passwords for it, a superfluous : is being added to the serialized hash within the database (and that breaks parsing so that people can't ever log in). As this is not really relevant in the real world (as nobody is hopefully using plain MD5 passwords anymore), this doesn't need any backward compatibility handling for the broken hashes. Change-Id: I753c135a6de39008488bd7462c2bfcda2cbac116
Diffstat (limited to 'tests/phpunit/includes/TestUser.php')
-rw-r--r--tests/phpunit/includes/TestUser.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/phpunit/includes/TestUser.php b/tests/phpunit/includes/TestUser.php
index 39822dc0a7ca..499353e0d994 100644
--- a/tests/phpunit/includes/TestUser.php
+++ b/tests/phpunit/includes/TestUser.php
@@ -114,8 +114,8 @@ class TestUser {
$passwordFactory = $this->user->getPasswordFactory();
$oldDefaultType = $passwordFactory->getDefaultType();
- // B is salted MD5 (thus fast) ... we don't care about security here, this is test only
- $passwordFactory->setDefaultType( 'B' ); // @TODO: Change this to A once that is fixed: https://gerrit.wikimedia.org/r/167523
+ // A is unsalted MD5 (thus fast) ... we don't care about security here, this is test only
+ $passwordFactory->setDefaultType( 'A' );
$newPassword = $passwordFactory->newFromPlaintext( $password , $this->user->getPassword() );
$change = false;