Added password hashing API
authorTyler Anthony Romeo <tylerromeo@gmail.com>
Wed, 31 Jul 2013 05:11:18 +0000 (05:11 +0000)
committerTyler Romeo <tylerromeo@gmail.com>
Sun, 27 Jul 2014 19:51:18 +0000 (15:51 -0400)
commit95a8974c6bda2c6353612c40b01b9c78527b8956
treeafc1afa6fcfd86d46c14f45e3f1653b6fbf6b481
parent38d580f8d74105155a32ee9934146e6bccd2f231
Added password hashing API

Deprecated the old User::crypt, et. al password hashing
system and implemented an extensible password hashing
API.

The new Password class allows registering of child classes
and provides factory functions for creating new Password
objects. The built-in hash types are the old MediaWiki MD5
types, which are for backwards-compatibility only, and bcrypt.

Also included is support for wrapping existing hashes as well
as encrypting passwords with a configured encryption key.

Bug: 54948
Bug: 28419
Change-Id: I0a9c972931a0eff0cfb2619cef3ddffd03710285
22 files changed:
RELEASE-NOTES-1.24
docs/hooks.txt
includes/AutoLoader.php
includes/DefaultSettings.php
includes/User.php
includes/password/BcryptPassword.php [new file with mode: 0644]
includes/password/EncryptedPassword.php [new file with mode: 0644]
includes/password/InvalidPassword.php [new file with mode: 0644]
includes/password/LayeredParameterizedPassword.php [new file with mode: 0644]
includes/password/MWOldPassword.php [new file with mode: 0644]
includes/password/MWSaltedPassword.php [new file with mode: 0644]
includes/password/ParameterizedPassword.php [new file with mode: 0644]
includes/password/Password.php [new file with mode: 0644]
includes/password/PasswordFactory.php [new file with mode: 0644]
includes/password/Pbkdf2Password.php [new file with mode: 0644]
maintenance/wrapOldPasswords.php [new file with mode: 0644]
tests/TestsAutoLoader.php
tests/phpunit/MediaWikiPasswordTestCase.php [new file with mode: 0644]
tests/phpunit/includes/PasswordTest.php [new file with mode: 0644]
tests/phpunit/includes/password/BcryptPasswordTest.php [new file with mode: 0644]
tests/phpunit/includes/password/LayeredParameterizedPasswordTest.php [new file with mode: 0644]
tests/phpunit/includes/password/Pbkdf2PasswordTest.php [new file with mode: 0644]