This doesn't yet completely eliminate the dependency
on user, because the individual password policy check
functions are still documented to receive User.
Password policy check functions can be defined by
extensions, and configured via $wgPasswordPolicy,
so we still need to unwrap user identity to a User
before passing into the actual check. But, this removes
User from the PassworkPolicyCheck interface.
Change-Id: If813b9b0ebbeb89bc61331c9da8efb86e591bfb9
Remove ::testPasswordPolicyDescriptionsExist(), should
be redundant to PasswordPolicyStructureTest::testCheckMessage
Use mock User objects instead of real ones, only
->getName() is needed
Change-Id: I362cfcfdbbc53cef54e72bce9bab0d24829472d7
The name change happened some time ago, and I think its
about time to start using the name name!
(Done with a find and replace)
My personal motivation for doing this is that I have started
trying out vscode as an IDE for mediawiki development, and
right now it doesn't appear to handle php aliases very well
or at all.
Change-Id: I412235d91ae26e4c1c6a62e0dbb7e7cf3c5ed4a6
Similar to checkPasswordCannotMatchUsername, MediaWiki should ensure
that users are unable to accidentally create or edit their username
to include their password as a substring of said username.
Bug: T241845
Change-Id: I437e91a5b83a792c5ad31e291915491bbb382dfa
It's causing quite a bit of WMF log spam because it's still used in wmf-config
Partial revert of I4c90e361b7538efeb0c5efa7ca61aed2e468591c
Change-Id: I7d1282e4260e7a42bee35b81d77470eb40dea818
Similar to other non-php files used by various classes/libs.
This leaves the serialized/ empty (apart from dotfiles), and as
such the directory was removed.
Change-Id: I538ffe0828843220ac4e161cf2e119deb9bd7ac0
From 21% to 82%.
* Added missing @covers, broadened @covers where appropriate.
* Added tests for some code that lacked them.
* Added a parameter to control the use of hash_pbkdf2() so that the pure
PHP fallback could be tested. In the non-fallback test, force the use
of the extension, and mark it skipped if it is not installed.
Bug: T167003
Change-Id: I987e1a89ec343907f4ead7f6192b2d4deb58ac16
Make password policies defined in a configurable policy, which is
defined by group. A user's password policy will be the maximum of
each group policy that the user belongs to.
Bug: T94774
Change-Id: Iad8e49ffcffed38df6293db0ef31a227d3962003