aboutsummaryrefslogtreecommitdiffstats
path: root/includes/user/TempUser
Commit message (Collapse)AuthorAgeFilesLines
...
* Add convenience method TempUserCreator::shouldAutoCreate()Tim Starling2023-05-123-0/+25
| | | | | | Factor out common concept originating in EditPage but since duplicated. Change-Id: I5f5b75a7da9a40a6cc3041d3d6192d2d747b9f57
* api: Use a temp placeholder for signature on preview/pstUmherirrender2023-05-041-0/+19
| | | | | | | | | | | | | | | For pst on parse/compare/editstash/(all)revisions/(all)deletedrevisions Do not show the IP when IP masking is enabled, instead show a previous aquired temp name or a placeholder on preview. MediaWiki itself used this for the ajax preview on GUI's action=edit Cannot acquire a new unsaved temp user as api parse does not persist the global session (each request results in a new id) and it would require a db write on a read request. Bug: T331397 Change-Id: I74bb4d655f371bd99e3b618d1a0ac45d730c746c
* Allow a temp username pattern to be reserved without activating the systemTim Starling2023-03-153-2/+28
| | | | | | | | | | | | | | | | | | | | | Split concepts of "match pattern" and "reserved pattern". Add config "reservedPattern" which specifies a username pattern to be denied for creation, but unlike matchPattern, it does not immediately flag all accounts with such names as temp accounts. This can be used before migration or after rollback to safely prevent creation of conflicting accounts. * Add TempUserConfig::isTempName(), which does what isReservedName() previously did, i.e. determines if a name is a temp username. * Make TempUserConfig::isReservedName() return true if the name matches either the match pattern or the reserved pattern. * UserNameUtils::isTemp() continues to determine whether a username is actually a temp username. * Add UserNameUtils::isTempReserved() as a proxy for TempUserConfig::isReservedName() Bug: T307064 Change-Id: I26755731fad89530a06824181106cd7b4e077d9e
* Add renameUsersMatchingPattern.phpTim Starling2023-03-131-0/+32
| | | | | | | | Add a maintenance script which can do a bulk rename of users matching a given pattern. Bug: T307064 Change-Id: I824cadeb23ec435ded6110030905058fe807ef2a
* Replace more usages of MWExceptionDaimona Eaytoy2023-01-262-6/+6
| | | | | Bug: T86704 Change-Id: I14abf71b7dcf432d0eb35f0b4ab2fa4fb797e2e8
* Revert "Reorg: Move some of request related classes to MediaWiki/Request"Zabe2022-10-271-2/+2
| | | | | | | | | This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922. Reason for revert: T166010#8349431 Bug: T166010 Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
* Reorg: Move some of request related classes to MediaWiki/RequestAmir Sarabadani2022-10-261-2/+2
| | | | | | | | | | | | | Moving: - DerivativeRequest - FauxRequest - FauxRequestUpload - PathRouter - WebRequest - WebRequestUpload Bug: T166010 Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
* TempUser: ScrambleMappingTim Starling2022-05-162-0/+100
| | | | | | | | Add a mapping function which converts sequential integers to a sequence in which most of the digits change each time, but without significantly increasing the length. Change-Id: I1011a96894fbf0b92d20a96149e68014f53e3c3c
* Suppress "named" group when TempUser system is disabledTim Starling2022-05-053-0/+15
| | | | | Bug: T307675 Change-Id: If3b2b7470caa35c28583cb09ef34373d7c955806
* TempUser infrastructure and servicesTim Starling2022-04-1412-0/+754
Add services and utilities for automatic creation of temporary user accounts on page save, in order to avoid exposing the user's IP address. * Add $wgAutoCreateTempUser, for configuring the system * Add TempUserConfig service, which interprets the config. * Add TempUserCreator service, which creates users during page save as requested by EditPage. With proxy methods to TempUserConfig for convenience. * Add table user_autocreate_serial. Table creation is necessary before the feature is enabled but is not necessary before deployment of this commit. Bug: T300263 Change-Id: Ib14a352490fc42039106523118e8d021844e3dfb