Rozszerzenie:CheckUser
![]() Status wydania: stabilne |
|
---|---|
![]() |
|
Realizacja | Strona specjalna , Tożsamość użytkownika , API , Hak , Bazy danych |
Opis | Funkcja CheckUser umożliwia uprawnionym użytkownikom sprawdzanie adresów IP używanych przez danych użytkowników oraz nazw użytkowników korzystających z danego adresu IP bez konieczności ręcznego wysyłania zapytań do bazy danych. |
Autor(zy) | Tim Starling, Aaron Schulz |
Ostatnia wersja | 2.5 (continuous updates) |
Polityka zgodności | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.35+ |
PHP | 7.4.3+ |
Zmiany w bazie danych | Tak |
Tabele | cu_changes cu_log_event cu_private_event cu_log |
Licencja | GNU General Public License 2.0 or later |
Pobieranie | |
|
|
|
|
|
|
Quarterly downloads | 245 (Ranked 43rd) |
Public wikis using | 9,118 (Ranked 13th) |
Przetłumacz rozszerzenie CheckUser jeżeli jest dostępne na translatewiki.net | |
Problemy | Otwarte zadania · Zgłoś błąd |
- Ta strona opisuje rozszerzenie. Zobacz Politykę CheckUserów na Meta Wiki, aby znaleźć informacje na temat wytycznych Fundacji Wikimedia.
CheckUser jest rozszerzeniem pozwalającym użytkownikom z uprawnieniem checkuser
na sprawdzanie adresów IP używanych przez danych użytkowników oraz nazw użytkowników korzystających z danego adresu IP bez konieczności ręcznego wysyłania zapytań do bazy danych.
Rozszerzenie jest wykorzystywane na wszystkich wiki Fundacji Wikimedia.
Pobieranie
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
- Kliknij "Kontynuuj"
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
Instalacja
Rozszerzenie jest udostępniane na licencji GNU General Public License 2.0 lub późniejszej. Oprogramowanie jest dostarczane w obecnym stanie. Aktualizacje będą wprowadzane według potrzeb wiki Fundacji Wikimedia, lub w przypadku wykrycia krytycznych problemów.
Na istniejącej wiki
Podstawowa
- Jeżeli zainstalowałeś inne rozszerzenia bez uruchamiania
php maintenance/update.php
, zrób to najpierw.
- Pobierz i umieść plik(i) w katalogu o nazwie
CheckUser
w folderzeextensions/
. - Tylko w przypadku instalacji z repozytorium git należy uruchomić Composer, aby zainstalować zależności PHP, poprzez wywołanie
composer install --no-dev
w katalogu rozszerzenia. (Zobacz zadanie T173141 w celu uzyskania informacji o możliwych komplikacjach.) - Dodaj poniższy kod na dole twojego pliku
LocalSettings.php
:wfLoadExtension( 'CheckUser' );
- Uruchom skrypt aktualizujący, który automatycznie stworzy potrzebne tabele dla tego rozszerzenia.
- Configure as required.
- Zrobione – Przejdź do Special:Version na twojej wiki, aby sprawdzić czy rozszerzenie zostało pomyślnie zainstalowane.
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"
]
}
}
}
Instalacja bez dostępu do wiersza poleceń
Wiele hostingów nie umożliwia bezpośredniego dostępu do konsoli shell, ale daje dostęp do tworzenia zadań cron (np. poprzez interfejs webowy cPanel).
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:
- Find the tables-generated.sql file in the
schema
folder of your copy of the CheckUser extension. Navigate in to the folder of the DB you are running to find the file.
- 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", select the location of the tables-generated.sql file, 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.
Na nowej wiki
Wykonaj krok 1 jak powyżej a następnie uruchom instalację MediaWiki. Instalator MediaWiki powinien automatycznie wykonać zadania związane z instalacją rozszerzenia, jeżeli zaznaczyłeś pole CheckUser gdy poproszono cię o wybranie rozszerzeń do zainstalowania.
Using Mediawiki-Docker
Follow the steps in MediaWiki-Docker/Extension/CheckUser to install this extension inside a MediaWiki Docker instance.
Konfiguracja
This tool copies recent changes data to separate tables, and adds to that when new entries are added.
If $wgPutIPinRC
is set to false
, the copied data will not contain the associated IP address.
However, entries added after installation of this extension will contain the IP address.
After installation of this extension, 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 allow this tool to log successful and failed login attempts as well as logouts, set $wgCheckUserLogLogins
to true
.
If you have bot accounts on your wiki, setting $wgCheckUserLogSuccessfulBotLogins
to false
will skip logging successful login attempts to bot accounts.
Nadawanie uprawnień CheckUser
To grant the right to use Special:CheckUser, Special:Investigate and Special:CheckUserLog, 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, the aforementioned special pages will show up in Special:SpecialPages page for that user.
To allow users to access the IP addresses of temporary accounts, they should be granted the checkuser-temporary-account right.
To give sysops all the rights this extension provides, put the following into LocalSettings.php
:
$wgGroupPermissions['sysop']['checkuser'] = true;
$wgGroupPermissions['sysop']['checkuser-log'] = true;
$wgGroupPermissions['sysop']['investigate'] = true;
$wgGroupPermissions['sysop']['checkuser-temporary-account'] = true;
To only allow the adding and removing of the checkuser
permission, use the following instead:
$wgAddGroups['sysop'][] = 'checkuser';
$wgRemoveGroups['sysop'][] = 'checkuser';
Konfiguracja
Parametr | Wartość domyślna | Komentarz |
---|---|---|
$wgCUDMaxAge
|
7776000
|
Definiuje jak długo przechowywane są informacje CheckUsera (w sekundach). Domyślna wartość to 3 miesiące. |
$wgCheckUserMaxBlocks
|
200
|
Limit masowej blokady |
$wgCheckUserForceSummary
|
false
|
Ustaw wartość tego ustawienia na true, jeżeli chcesz wymusić na checkuserach podawanie powodu każdego indywidualnego sprawdzenia które wykonują za pośrednictwem Special:CheckUser. (Nie jest to specjalnie skuteczna metoda, ponieważ checkuser może bez problemu podać powód w stylu „Wymaga sprawdzenia” lub „Bo tak”, a oprogramowanie nie będzie o tym wiedzieć.) |
$wgCheckUserCIDRLimit
|
[ 'IPv4' => 16, 'IPv6' => 19 ]
|
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 (<=1.39)true (1.40+)
|
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 |
$wgCheckUserTemporaryAccountMaxAge (1.40+)
|
86400
|
The number of seconds for which the temporary account API response is fresh. |
$wgCheckUserEventTablesMigrationStage (1.40+)
|
3
|
Used to control the migration stage of log events stored in cu_changes to the new cu_log_event and cu_private_event tables. Is temporary and will be removed once migration is complete. |
Special:CheckUser usage
Podstawy interfejsu
- 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. The CIDR prefix value for IPv4 can be between 16-32 and the value for IPv6 can be between 19-128. The smaller number for both ranges can be changed using the configuration variable $wgCheckUserCIDRLimit. For notation, see Help:Blokowanie zakresów IP .
- 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.
- Znajdź adresy IP - returns IP addresses used by a registered user.
- Pokaż edycje - 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.
- Znajdź użytkowników - returns user accounts that have edited from an IP or range.
- In the "Powód" 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
-
Podstawowy interfejs CheckUsera
-
Przykładowe sprawdzenie nazwy użytkownika
-
Przykładowe sprawdzenie adresu IP
-
Example Get edits check
-
Przykładowy rejestr
Zwracane informacje
A typical entry in the CheckUser results for a user summary ("get users") is as follows:
- Example (talk | contribs | block) (Check) (20:11, 08 czerwiec 2023 -- 20:12, 08 czerwiec 2023) [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:
- nazwa użytkownika (linki użytkownika) (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.
Format XFF
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.
Linki z narzędziami
Gdy uzyskasz wynik sprawdzenia na Special:CheckUser, możesz dodać spersonalizowane linki do narzędzi poprzez dwa komunikaty systemowe:
MediaWiki:checkuser-userlinks-ip
dla sprawdzeń adresów IP (przykład: m:MediaWiki:checkuser-userlinks-ip)MediaWiki:Checkuser-userlinks
dla sprawdzeń zarejestrowanych użytkowników (przykład: 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 Nazwy użytkownika i adresy IP field, type in up to 10 targets, which may be usernames (without the
User:
prefix), IP addresses, or CIDR ranges. - In the Powód 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 checkuser-log 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 IP i aplikacje klientów tab.
Showing IPs for temporary accounts
Wersja MediaWiki: | ≥ 1.40 |
The CheckUser extension will show since MediaWiki 1.40 a button that is displayed next to temporary account user links which allows the revealing of their IP address.
This functionality is available exclusively to users with the checkuser-temporary-account
privilege, granting them the ability to view the IP addresses that are linked to temporary accounts.
To access this information, the Enable revealing IP addresses for temporary accounts feature must be enabled on the user's Special:Preferences page.
These buttons will appear wherever user links are shown for a temporary account, such as when viewing page histories or in Special:Contributions. However, these will not be shown on Special:CheckUser, Special:Investigate or Special:InvestigateBlock.
API
CheckUser and CheckUserLog API
CheckUser dodaje również swoje API.
These two APIs work fairly similarly to the special pages, but the reason for a check using the checkuser
API is prefixed with "API:" to indicate they were made using the API.
Example usages of these APIs are shown below.
- CheckUser 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
- CheckUserLog API
api.php?action=query&list=checkuserlog&culuser=WikiSysop&cullimit=25 api.php?action=query&list=checkuserlog&cultarget=127.0.0.1&culfrom=20111015230000
Temporary Account Reveal API
Wersja MediaWiki: | ≥ 1.40 |
Usage
The TemporaryAccountHandler class offers API endpoints for retrieving the IP addresses associated with temporary user accounts. To access this information, the Enable revealing IP addresses for temporary accounts feature must be enabled on the user's Special:Preferences page.
API endpoint
GET /rest.php/checkuser/v0/temporaryaccount/{name}
where {name}
is the user name you want to look up
Response
If the request is successful, the API will respond with a JSON object containing the following fields:
Name | Type | Description |
---|---|---|
ips
|
string[]
|
IPs of the given temporary account |
If the request fails, the API will respond with an appropriate error code and message.
Example request
GET /rest.php/checkuser/v0/temporaryaccount/*Unregistered%202
Example response
{"ips": [ "114.127.69.62" , "212.47.235.82" , "212.47.235.81" ]}
TemporaryAccountRevisionHandler
The TemporaryAccountRevisionHandler class offers API endpoints for viewing the IP associated with a revision for temporary accounts. You can specify one or multiple revision IDs in the query string.
API endpoint
GET /rest.php/checkuser/v0/temporaryaccount/*Unregistered%203/revisions/{revisionId}
where {revisionId}
is the revision ID(s) you want to look up separated by the |
character.
Odpowiedź
If the request is successful, the API will respond with a JSON object containing the following fields:
Name | Type | Description |
---|---|---|
ips
|
dictionary
|
The revision ID as the key and the associated IP address as the value. |
If the request fails, the API will respond with an appropriate error code and message.
Przykładowe zapytanie
GET /rest.php/checkuser/v0/temporaryaccount/*Unregistered%203/revisions/31
Przykładowa odpowiedź
{"ips":{"31":"40.175.36.227"}}
Example request with multiple revisions
GET /w/rest.php/checkuser/v0/temporaryaccount/*Unregistered%205/revisions/194|193
Przykładowa odpowiedź
{"ips":{"194":"40.175.36.227","193":"1.2.3.4"}}
To rozszerzenie jest wykorzystywane przez jeden lub więcej projektów Wikimedia. Oznacza to prawdopodobnie, że to rozszerzenie jest stabilne i działa wystarczająco dobrze, aby wykorzystywać je na stronach o dużym natężeniu ruchu. Odnajdź nazwę tego rozszerzenia w plikach konfiguracyjnych Wikimedia CommonSettings.php oraz InitialiseSettings.php, aby zobaczyć gdzie są zainstalowane. Pełną listę rozszerzeń zainstalowanych na określonej wiki można znaleźć na stronie Special:Version na danej wiki. |
To rozszerzenie jest dołączone do następujących pakietów lub farm wiki: To nie jest pełna lista. Niektóre farmy/wiki mogą wykorzystywać to extension, nawet jeśli nie są tutaj wymienione. Zawsze sprawdzaj swoje farmy/hosty wiki, aby to potwierdzić. |