Extension:CheckUser
![]() وضعیت انتشار: پایدار |
|
---|---|
![]() |
|
انجام | Special page , User identity , API , قلاب , پایگاه داده |
توضیحات | CheckUser function allows a user with permissions to check which IPs are used by a given username and which usernames are used by a given IP, without having to run queries directly against the database by hand. |
نویسنده(گان) | Tim Starling, Aaron Schulz |
آخرین نسخه: | 2.5 (continuous updates) |
سیاست سازگاری | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.27+ |
PHP | 5.4+ |
تغییر پایگاه داده | بله |
جدولها | cu_changes cu_log_event cu_private_event cu_log |
مجوز | GNU General Public License 2.0 or later |
بارگیری | |
|
|
|
|
Quarterly downloads | 284 (Ranked 35th) |
Public wikis using | 4,936 (Ranked 20th) |
Translate the CheckUser extension if it is available at translatewiki.net | |
Issues | Open tasks · گزارش یک مشکل |
- This page is about the extension itself. For the Wikimedia Foundation CheckUser policy, see m:CheckUser policy.
CheckUser is an extension that allows a user (with the checkuser
permission) to check which IP addresses are used by a given username and which usernames are used by a given IP, without having to run queries directly against the database by hand.
The extension is running live on all Wikimedia wikis.
دریافت
The extension can be retrieved directly from Git [?]:
- Browse code
- Some extensions have tags for stable releases.
- Browse tags
- Select the tag
- Click "snapshot"
- Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).
- Browse branches
- Select a branch name
- Click "ادامه"
Extract the snapshot and place it in the extensions/CheckUser/ directory of your MediaWiki installation.
If you are familiar with Git and have shell access to your server, you can also obtain the extension as follows:
cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CheckUser.git
نصب
The extension is released under the GNU General Public License 2.0 or later. The software is provided as-is. Updates will be made according to the needs of Wikimedia wikis; or where critical vulnerabilities are discovered.
در یک ویکی موجود
پایه
- If you have installed other extensions without running
php maintenance/update.php
, run that first.
- Download and place the file(s) in a directory called
CheckUser
in yourextensions/
folder. - Only when installing from Git, run Composer to install PHP dependencies, by issuing
composer install --no-dev
in the extension directory. (See وظیفه T173141 for potential complications.) - کد زیر را در انتهای $LocalSettings خودتان اضافه کنید:
wfLoadExtension( 'CheckUser' );
- اسکریپت بهروزرسانی اجرا کنید تا به طور خودکار جدولهای پایگاه دادهها ضروری که این افزونه نیازمند دارد را ایجاد کند.
- Configure as required.
- انجام شد – به Special:Version در ویکی خودتان بروید تا مطئمن شوید که افزونه با موفقیت نصب شده است.
So, after installation from Git change to the directory containing the extension e.g. "../extensions/CheckUser/" and run composer install --no-dev
, or when updating: composer update --no-dev
.
Alternatively as well as preferably add the line "extensions/CheckUser/composer.json"
to the "composer.local.json" file in the root directory of your wiki like e.g.
{
"extra": {
"merge-plugin": {
"include": [
"extensions/CheckUser/composer.json"
]
}
}
}
Installing without command prompt access
Many hosting providers don't allow direct shell access, but allow creation of cron jobs (e.g. via cPanel web interface).
For those hosting providers a temporary cron job can be used to run php /path/to/install.php
(naturally /path/to
should be replaced with real full path to install.php
).
If you are using a remote server and do not have command prompt access (nor cron job solution is suitable for you), but do have access through phpMyAdmin, substitute these steps for step #2 above:
- Choose and download the tables_generated.sql file from the CheckUser/schema folder. Navigate in to the folder of the DB you are running to find the files.
- In phpMyAdmin, click the database you're using for MediaWiki along the left side
- On the next screen, click the "Import" tab at the top.
- At "Location of the text file", choose one of the files, select compression "None", and click the bottom "Go" button.
- If your phpMyAdmin screen has only a text field and no text file chooser, click the "SQL" button in the left-side column, under the phpMyAdmin logo, and click the "import files" tab in the new window that opens.
- Repeat for the second file
در یک ویکی تازه
Follow step 1 as above, then run the MediaWiki installation. The MediaWiki installer will automatically perform the installation tasks if you select the checkbox for CheckUser when prompted for which extensions to install.
Using Mediawiki-Docker
Follow the steps in MediaWiki-Docker/Extension/CheckUser to install this extension inside a MediaWiki Docker instance.
Configuration
This tool migrates recent changes data to a separate tables, and adds to that when new entries are added.
If $wgPutIPinRC
was previously set to false
, there will be no initial data to search but new edits will fill in as soon as the extension is set up.
After you run the queries, you can reduce $wgRCMaxAge
to make recentchanges shorter, without affecting checkuser.
Use $wgCUDMaxAge
to set how far back checkuser data can go, in seconds.
The CheckUser-specific setting $wgCheckUserCIDRLimit determines the largest range that can be checked in a single check.
Its format is the same as $wgBlockCIDRLimit .
The default limit is /32
for IPv6
checks and /16
for IPv4
checks.
To enable Special:Investigate, set $wgCheckUserEnableSpecialInvestigate
to true
in LocalSettings.php.
Granting right to use CheckUser
To grant the right to use the Check User function, a user with user rights management must go to Special:UserRights and enter the user's name in the box, then select the option "checkuser". Once this is done, Special:CheckUser and Special:CheckUserLog will show up in Special:SpecialPages page for that user.
To turn on user rights management for sysops, put the following into LocalSettings.php
:
$wgGroupPermissions['sysop']['checkuser'] = true;
$wgGroupPermissions['sysop']['checkuser-log'] = true;
$wgGroupPermissions['sysop']['investigate'] = true;
To only allow the adding and removing of the checkuser
permission, use the following instead:
$wgAddGroups['sysop'][] = 'checkuser';
$wgRemoveGroups['sysop'][] = 'checkuser';
پیکربندی
parameter | default | comment |
---|---|---|
$wgCUDMaxAge
|
7776000
|
How long to keep CU data (in seconds)? (default = 3 months) |
$wgCheckUserMaxBlocks
|
200
|
Mass block limits |
$wgCheckUserForceSummary
|
false
|
Set this to true if you want to force checkusers into giving a reason for each check they do through Special:CheckUser. (Not very useful, given that checkusers could simply give a summary such as "they need to be checked" or "I feel like it" and the software would not know.) |
$wgCheckUserCIDRLimit
|
[ 'IPv4' => 16, 'IPv6' => 32 ]
|
Shortest CIDR limits that can be checked in any individual range check |
$wgCUPublicKey
|
''
|
Public key to encrypt private data that may need to be read later. Generate a public key with something like:
|
$wgCheckUserCAMultiLock
|
false
|
This can be used to add a link to Special:MultiLock by CentralAuth to the Special:CheckUser's mass block form. This requires the CentralAuth extension to be installed on the wiki. To enable this, set this to an array with a central wiki's database name and an array with the name(s) of the global group(s) to add the link for. For example:
$wgCheckUserCAMultiLock = [
'centralDB' => 'metawiki',
'groups' => [ 'steward' ]
];
|
$wgCheckUserCAtoollink
|
false
|
Since 77360f1cf1d2. This adds a link to central wiki Special:CentralAuth to the Special:CheckUser's "Get users" results. This requires the CentralAuth extension to be installed on the wiki. To enable this, set this with a central wiki's database name. For example:
$wgCheckUserCAtoollink = 'metawiki';
|
$wgCheckUserGBtoollink
|
false
|
Since 77360f1cf1d2. This adds a link to local or central wiki Special:GlobalBlock to the Special:CheckUser's "Get users" results. This requires the GlobalBlocking extension to be installed on the wiki. To enable this, if a $wgConf is configured, set this to an array with a central wiki's database name and an array with the name(s) of the local (or global if you have CentralAuth installed) group(s) to add the link for. For example:
$wgCheckUserGBtoollink = [
'centralDB' => 'metawiki',
'groups' => [ 'steward', 'staff' ]
];
|
$wgCheckUserEnableSpecialInvestigate
|
false
|
Since 57dcfe46d2e4. This enables Special:Investigate, an updated version of Special:CheckUser that allows checking for multiple user accounts and IP addresses within one investigation. |
$wgCUPublicKey
|
''
|
Used with an associated private key to encrypt certain data that is not shown to CUs but stored in the cu_changes or cu_private_event table. Currently this is only the recipients of emails. Without a valid public key the data will not be stored. |
$wgCheckUserLogLogins
|
false
|
Whether CheckUser should log login attempts (both successful and not) in the checkUser table. |
$wgCheckUserLogSuccessfulBotLogins
|
true
|
Whether CheckUser should store successful login attempts to accounts with the bot user group if $wgCheckUserLogLogins is set to true . Only is used if $wgCheckUserLogLogins is true
|
$wgCheckUserMaximumRowCount
|
5000
|
The maximum number of results that can be returned by Special:CheckUser. Before MediaWiki 1.39, in the 'Get edits' and 'Get IPs' results having over 5000 results would return the results in a different format. From MediaWiki 1.39 this is the maximum number of results to show by page and more can be generated using the paging links |
$wgCheckUserInvestigateMaximumRowCount
|
25000
|
Similar to $wgCheckUserMaximumRowCount, but for Investigate |
Special:CheckUser usage
Basic interface
- Go to Special:CheckUser.
- In the user field, type in the username (without the
User:
prefix), IP address, or CIDR range.
- IP: any IPv4 or IPv6 address.
- CIDR: you can check a range of IP addresses by appending the CIDR prefix (by default, up to /16 for IPv4 (65,536 addresses), up to /64 for IPv6 (~1.8446*1019 addresses) before gerrit:7352, up to /48 for IPv6 (~1.2089*1024 addresses or 65536 /64s - controlled by $wgCheckUserCIDRLimit in the latest version) after revision 7352, and up to /32 (65536 /48's) after phab:rECHU9d7c239bf88866eca577f3241194d440f94fa014).
For notation, see Help:مسدود کردنهای محدوده .
- XFF: you can check a client IP address provided by X-Forwarded-For headers by appending
/xff
(for example,127.0.0.1/xff
).
- XFF: you can check a client IP address provided by X-Forwarded-For headers by appending
- Select the information you want to retrieve.
- دریافت نشانیهای آیپی - returns IP addresses used by a registered user.
- دریافت ویرایشها - returns all edits and logged actions made by users using an IP address or range specified in the target field, or if the target is a user all edits and logged actions by that user.
- فهرستکردن کاربران - returns user accounts that have edited from an IP or range.
- In the "دلیل:" field, type in the reason you are accessing the confidential data.
Try to succinctly summarise the situation (for example, "cross-wiki spam"); this will be logged in a log visible only to users with the checkuser-log
permission.
- Screenshots
-
Basic CheckUser interface
-
Example username check
-
Example IP check
-
Example Get edits check
-
Example log
Information returned
A typical entry in the CheckUser results for a user summary ("get users") is as follows:
- Example (talk | contribs | block) (Check) (20:11, ۲۵ ژانویه ۲۰۲۳ -- 20:12, ۲۵ ژانویه ۲۰۲۳) [5]
- 127.0.0.37 XFF: 127.0.0.1, 127.0.0.5
- Example user agent
This is formatted to fit a lot of information into a format that can very easily be listed and skimmed, but is difficult to read unless you know what the information provided is. The information is laid out as follows:
- username (user links) (time period when they edited from the given IP or range) [number of edits from the IP or range]
- IP address edited from XFF: XFF information provided (can be spoofed)
Each IP/XFF combination used to edit is listed, in order of use.
The last ten user agents (browser, operating system, system language, and versions) for each user for edits made in the IP or range are listed afterwards.
XFF Format
XFF (X-Forwarded-For) headers indicate the series of IP addresses used from the user's computer (first) to the last proxy server. In case of Wikimedia, the last proxy server is one of the Wikimedia proxies (listed under $wgCdnServersNoPurge in the Wikimedia configuration file).
In this example:
aaa.aaa.aaa.aaa XFF: 10.4.46.42, 127.0.0.1, aaa.aaa.aaa.aaa, 208.80.152.46
- the first two addresses (
10.4.46.42
,127.0.0.1
) are private to the originating network and can't be reached directly from the public Internet,
- the third address (
aaa.aaa.aaa.aaa
) is the "public face" of the editor, usually a broadband or dial-up ISP, a company gateway, (but possibly an anonymizer or a malware-compromised server),
- the last address (
208.80.152.46
) is one of the Wikimedia squids (sq36.wikimedia.org
).
MediaWiki configuration settings $wgUsePrivateIPs , $wgCdnServers , $wgCdnServersNoPurge and extensions using the IsTrustedProxy hook (such as Extension:TrustedXFF ) change the way an actual IP address used to attribute edits is selected.
Personal tool links
When you get results from Special:CheckUser you can add personal user tool links via two interface messages:
MediaWiki:checkuser-userlinks-ip
for IP addresses (for example m:MediaWiki:checkuser-userlinks-ip)
MediaWiki:Checkuser-userlinks
for registered users (for example m:MediaWiki:Checkuser-userlinks)
MediaWiki:checkuser-toollinks
- for IPs in the 'Get IP Addresses' check type (for example m:MediaWiki:checkuser-toollinks)
Special:Investigate usage
Basic usage
- Go to Special:Investigate.
- In the Usernames and IP addresses field, type in up to 10 targets, which may be usernames (without the
User:
prefix), IP addresses, or CIDR ranges. - In the Reason field, enter the reason you are accessing the confidential data, as described in the Special:CheckUser instructions above; this will be logged in a log visible only to users with the investigate permission.
- Screenshots
-
Input form
-
Account information tab
-
IPs and user agents tab
-
Timeline tab
For advanced feature usage, see Help:Special Investigate.
Customizing tool links
As with Special:CheckUser, links to external tools can be customized.
The links are defined in the checkuser-investigate-compare-toollinks
message.
This message is parsed to find links, which are added to the menu in the IPs and user agents tab.
API
CheckUser also provides an API.
api.php?action=query&list=checkuser&curequest=userips&cutarget=Jimbo_Wales api.php?action=query&list=checkuser&curequest=edits&cutarget=127.0.0.1/16&xff=1&cureason=Some_check
api.php?action=query&list=checkuserlog&culuser=WikiSysop&cullimit=25 api.php?action=query&list=checkuserlog&cultarget=127.0.0.1&culfrom=20111015230000
این افزونه در یکی یا بیشتر پروژههای ویکیمدیا استفاده شده است. این احتمالاً به این معنی است که افزونه پایدار است و به اندازه کافی برای استفاده توسط وبسایتهای ترافیک-بالا به خوبی کار میکند. برای نام این افزونه در پروندههای پیکربندی CommonSettings.php و InitialiseSettings.php ویکیمدیا بگردید تا جایی که آنها نصب شده را ببینید. یک فهرست کامل از افزونهها نصبشده روی یک ویکی مشخص را میتوان در صفحۀ Special:Version دید. |
This extension is included in the following packages and/or wiki farms: This is not an authoritative list. Some wiki farms/hosts may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |