PasswordFactory::newFromPlaintext( null ) needs to work
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 29 Sep 2014 18:40:51 +0000 (14:40 -0400)
committerOri.livneh <ori@wikimedia.org>
Mon, 29 Sep 2014 21:42:33 +0000 (21:42 +0000)
commit4dc1f5a1759bdf392504f4901748175b46f59a7e
treebb53227fde048484b8755710351659c935dd1bcc
parent3c8869569b034d1c62a1fc2fa772b5ebb8301d53
PasswordFactory::newFromPlaintext( null ) needs to work

Various code passes null around to mean "an invalid password". It
shouldn't all have to test for null and specially handle that.

This also fixes a codepath where User::$mNewpassword could get set to an
empty string rather than a password object, which would cause problems
later when anything else tries to use it.

Bug: 71421
Change-Id: Ib5f94b52c07e7dba89328b98fb43c86db95ee09f
includes/User.php
includes/password/PasswordFactory.php
tests/phpunit/includes/PasswordTest.php