| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T353458
Change-Id: Ibe1810f1c71316a9124e1dc6ae405097dafd5267
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Not needed (any more) because the code already contains
enough @return docs and such.
Change-Id: If461fa035d2c646878540565b3087a74c6628552
|
| |
| |
| |
| |
| | |
Bug: T388255
Change-Id: I6e1a6fa8e75f519ccbf3c2bb4de7334f620e2a8e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add a batch version of CentralIdLookup::isOwned(), to support the
linked bug.
* Add test.
* Fix error in LocalIdLookupTest::provideIsAttachedShared() which
failed to provide the shared case due to an incorrect loop bound.
This test has been non-functional since it was introduced in 2015.
* Fix error in LocalIdLookupTest::newLookup() which failed to override
the config.
Bug: T386584
Depends-On: Ie63ed1f14c9ba4f9cefcceef05d5585a6676f111
Depends-On: I83716f7930bd0d2de4761cc5b04d9d3ff4172da2
Change-Id: I99dd733547f46e635c2f363166ce111e76e06a5e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There's about 100 callers of the DatabaseBlock constructor in core
tests, most of them passing an address parameter which needs access to
the global service container to parse.
Many are passing the constructed object straight to
DatabaseBlockStore::insertBlock(). So add insertWithParams() for their
convenience, which has some handy shortcut parameters, has service
access, and throws on failure. The calling code tends to be shorter
than before.
For unit tests trying to construct DatabaseBlock objects without a
service container, direct construction of BlockTarget subclasses is
warranted. Add a default to the $wikiId parameters for their
convenience.
MockBlockManager had its own 'target' parameter, mixed in with block
options, carrying its own special idea of a target, which conflicted
with DatabaseBlock's new 'target' parameter. Harmonise the parameters
and fix the callers.
Bug: T382106
Bug: T385966
Change-Id: I78b45a6003b62962211379c36da5587081f90f00
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
* Temporary accounts are automatically created when a user makes
an edit, and therefore do not have a password set by the user
who created the temporary account
* Currently, there is no limitation that prevents a password being
set for a temporary account.
** This means that the createAndPromote.php maintenance script
can set a password for a temporary account or create a new
temporary account with a specified password.
* A temporary account having a password allows a user to login to
the account, even after the account has expired.
** This should not be allowed, and as such we should reject any
attempts to set or change the password for a temporary
account.
What:
* Update User::checkPasswordValidity to reject any password
provided if the user matches the temporary account name format.
* Add tests for this.
Bug: T386775
Change-Id: I5354d240678fca9dbf3ed699370cf1a4df96b2f9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make the Maintenance transaction wrapper methods directly invoke
DeferredUpdates::tryOpportunisticExecute() and flush stats data.
This includes the following methods:
* Maintenance::commitTransaction()
* Maintenance::commitTransactionRound()
* Maintenance::waitForReplication()
Add explicit DeferredUpdates::tryOpportunisticExecute() calls to
integration tests as needed.
Deprecate the now-unused IDatabase::setTransactionListener() and
ILBFactory::setWaitForReplicationListener().
Bug: T373057
Change-Id: I06488d1826ee97de460cf52117b5d691fa5945ad
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Mostly used find-and-replace:
Find:
/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?)[\s\*]+/\s*(private|protected|public) (\$[a-z]\w+;\n)((?=\s*/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?))\n|)
Replace with:
\3 \1 \4
More could be done, but to keep this patch reasonably sized, I only
changed the most obvious and unambiguously correct cases.
In some cases, I also removed redundant doc comments on the
constructor, and re-ordered the properties to match the constructor.
Bonus: Fix some todos in AuthManagerTest.
Change-Id: Ife5313b821cf537984f6de364bfe1d9b4b992a07
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- The config variable $wgAutopromoteOnceLogInRC controls whether
autopromotions show up in recent changes, but offers no granular
controls beyond that.
- In T377829, stewards have expressed interest in excluding certain
spammy autopromote groups from recent changes.
What:
- Introduce and use a new config variable
$wgAutopromoteOnceRCExcludedGroups that can be used to define
a denylist of groups. Autopromotions into these groups will never
result in an RC entry, as long as they were the only new groups
the user was autopromoted into.
Bug: T377829
Change-Id: Ia4942b09a5162749f24c8f674429fbf3f0459a0b
|
|
|
|
| |
Change-Id: I27b9a19ab952ede1267921bd042af0fe1c89e228
|
|
|
|
|
|
|
|
|
|
|
| |
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is to prevent infinite recursion when checking APCOND_BLOCKED due
to potentially repeated calls to user->getBlock.
UserGroupManager::checkCondition now throws a LogicException when
recursive behavior is detected during the APCOND_BLOCKED check.
Bug: T349608
Change-Id: Ia55a4d27be0f583c3bc826661579cbb4e7c47881
|
| |
| |
| |
| |
| | |
Bug: T353458
Change-Id: I23cf7991f8792d4d000d1780463d8ce76dc0aee0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
* A hook is needed which is called when User::spreadAnyEditBlock
is called, so that extensions which provide alternative blocking
mechanisims (such as the GlobalBlocking extension) can spread
their blocks when local blocks are spread.
What:
* Add SpreadAnyEditBlockHook which is called from User
::spreadAnyEditBlock when it is called except when the user is
not registered.
** The hook is called even if the user is not locally blocked
* The return value of User::spreadAnyEditBlock is modified to
return true if either a local block or alternative blocking
mechanism spread blocks.
* Update UserTest to test this new behaviour.
Bug: T374857
Change-Id: Id302a6362d6177c89da9cdf4e677b3822ecb85f1
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move the checks for the existence of the user and the presence of
their email address before the 'SpecialPasswordResetOnSubmit' hook,
instead of after. This allows extensions to make their own decisions
about whether a user exists or has email.
This also means that extensions must now check the 'requireemail'
preference when only the username is provided. They already had to
check it when only the email was provided, so this seems more like a
bug fix. To allow them to check this logic, if both the username and
email were provided by the user, provide both of them to the hook.
Bug: T151012
Change-Id: I6baf2c5194f981803198729f59e1e83d5644383a
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.
Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.
Change-Id: Ifc27750207edc09e94af030d882b6f1a5369cf98
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update a few tests that relied on the feature flag to ignore
the 'requireemail' preference on "User1" to instead use "User2",
who doesn't have the preference set.
Bug: T242406
Change-Id: I996d3996272d704a071d1d2094c3568247b80f98
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Treat the username/email as provided when it's a falsy string ('0').
Refactor away some redundant checks and variables.
Only construct User objects when needed for the hook.
Documentation and code style tweaks.
Change-Id: I499d73dacfb48a95291dcfa0405e52788a0251f4
|
|/ /
| |
| |
| |
| |
| |
| | |
It adds MediaWiki\Content namespace to WikitextContent
and two classes related.
Change-Id: Ib74e4c5b3edac6aa0e35d3b2093ce1d0b794cb6d
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
This mostly reverts commit 28ad29ea0ff9480c97d4d5746f5b2526dfb1a3f5.
Checking the validity of the provided email doesn't reveal any
information about any users, and it could help catch genuine mistakes,
e.g. if someone inputs the username in the email field.
Previously if an invalid email was provided, we showed a success
message that is an obvious lie (saying we sent an email to something
that isn't an email address).
Change-Id: Idec437b29b22e5b1e5aaff3846632fbc413a3dcb
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
I believe this makes the code less brittle, and also makes it a bit
more obvious what these strings are meant to represent.
Change-Id: Ia39b5c80af4b495931d0a68fd091b783645dd709
|
|/
|
|
|
|
|
|
|
| |
And deprecated aliases for the the no namespaced classes.
ReplicatedBagOStuff that already is deprecated isn't moved.
Bug: T353458
Change-Id: Ie01962517e5b53e59b9721e9996d4f1ea95abb51
|
|
|
|
|
| |
Bug: T316841
Change-Id: Ie6b08125b76d2d4b7a30375357dcb90aaa0189c1
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
- The test has a mix of IP and named accounts in its tests, which won't
work when temp accounts are enabled
What:
- Disable temp accounts feature for the test
Bug: T365669
Change-Id: I94ee06aea6fa9f891f0b40417056ae9c1d21126a
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
- Two test cases check for IP editing functionality, which won't work
with temp accounts enabled
What:
- Disable temp accounts for those two test cases
Bug: T365669
Change-Id: I445b547da8b5b224984c15a1a79ef38ad8dd2dd1
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- This test checks for anonymous editing functionality specifically
What:
- Disable temp accounts for this test
Bug: T365669
Change-Id: Id665af3549add78e54be790209fbc890d78e5b74
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- isTemp is not reset after logging out as a temp user because the
isTemp property is cached in-process, and not reset in
User::loadDefaults()
What:
- When creating a new User, reset the isTemp field to null. The next
invocation of isTemp() will update the value of the isTemp field.
Bug: T345936
Change-Id: Ibff540c4d92fe53ec6d3af3488a12f7446dfdfbe
|
|
|
|
|
| |
Bug: T316841
Change-Id: I29e535e8ee9b5641a4546d53b98cd5060d39681d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* When temporary accounts were first implemented, temporary users were
added to the 'user' group, and named users were added to a 'named'
user group, to differentiate them from temporary users.
* Since T340457, temporary users were no longer added to the 'user'
group. This means that the 'named' group is no longer needed.
What:
* Stop adding users to a 'named' user group in UserGroupManager.
* Remove special handling for the 'named' group in PermissionManager
and tests.
Bug: T355741
Change-Id: I06bd5d7150203bbcb0806868fe829a438af486ba
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: Iae45fa269363be8ee05c598ea6926514ce817762
|
|/
|
|
|
|
| |
Some fixes done via codesniffer fix (Ibd0f48e14e)
Change-Id: I0404ceca7c5abe8d32ef9a8fce404c7b89ffbaae
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I2f29ea8227da64b79b70fcce3decb6e34ea8da5b
|
|/
|
|
|
| |
Bug: T353458
Change-Id: I1a701b5b7ff65356692abb0efde9a2207b6135b6
|
|
|
|
|
|
| |
Not sure why I added these, it should be clear from the method names
Change-Id: Ie49881e6f31fad52bb65b0d2ac3e9379dbb7bfc5
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
StatusValue::replaceMessage() doesn't really work if given a
MessageSpecifier, and doesn't work at all if given a MessageValue.
StatusValue::hasMessage() and ::hasMessagesExcept() ignore the message
parameters when searching if given a MessageSpecifier or MessageValue.
Therefore, deprecate passing anything other than strings representing
message keys to these methods.
Change-Id: Icb4effc6c5319c12ba4ebeab447a0cef54f8e255
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I13fe4d9a35bac0e51960722b1436783a22fef745
|
|/
|
|
|
| |
Bug: T277511
Change-Id: Ifea9eb11884ff52b22631b309ff0489332e741ba
|
|
|
|
|
| |
Bug: T344971
Change-Id: Ic6940fcc06225069a0c3618c22a0e62942e5dd88
|
|\ |
|