확장 기능:검사관
CheckUser 출시 상태: 안정 |
|
---|---|
구현 | 특수 문서 , User identity , API , 훅 , 데이터베이스 |
설명 | CheckUser 기능을 사용하면 사용자가 데이터베이스에 직접 쿼리를 실행하지 않고도 특정 사용자 이름에서 사용되는 IP와 사용자 이름을 확인할 수 있습니다. |
만든 이 | Tim Starling, Aaron Schulz, Dreamy Jazz |
최신 버전 | 2.5 (continuous updates) |
호환성 정책 | 스냅샷은 미디어위키와 함께 릴리스됩니다. Master is not backward compatible. |
PHP | 7.4.3+ |
데이터베이스 변경 | 예 |
Virtual domain | virtual-checkuser-global |
테이블 | cu_changes cu_log_event cu_private_event cu_log cu_useragent_clienthints cu_useragent_clienthints_map cu_useragent cuci_wiki_map cuci_temp_edit cuci_user |
라이선스 | GNU General Public License 2.0 or later |
다운로드 | |
|
|
|
|
|
|
Quarterly downloads | 200 (Ranked 28th) |
Public wikis using | 9,118 (Ranked 13th) |
CheckUser 확장 기능 번역 (translatewiki.net에서 가능한 경우) | |
이슈 | 미해결 작업 · 버그 보고 |
- 이 문서는 확장 기능에 관한 것입니다. 위키미디어 재단의 검사관 정책을 찾으신다면, m:CheckUser policy를 보십시오.
Checkuser는 checkuser
을 가지고 있는 사용자가 데이터베이스에 직접 쿼리를 요청하지 않고도 사용자가 사용하는 아이피와 어떤 사용자가 특정 아이피를 사용하는지 알 수 있는 확장 기능입니다.
이 확장 기능은 모든 위키미디어 위키에서 사용 중입니다.
Updates will be made according to the needs of Wikimedia Foundation wikis; or where critical vulnerabilities are discovered.
설치
- 파일을 다운로드하고
CheckUser
폴더를extensions/
디렉토리에 넣어 주세요.
개발자와 코딩 기여자는 Git을 이용해 확장기능을 다운받는 것이 좋습니다.cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CheckUser - Git에서 설치할 경우, PHP 의존 기능을 설치하려면 Composer를 실행하여 확장 기능 디렉터리에
composer install --no-dev
를 발행하십시오. (잠재적인 문제에 대해서는 작업 T173141 을 참고하십시오.) - 아래의 코드를 LocalSettings.php 코드의 마지막에 추가합니다.
wfLoadExtension( 'CheckUser' );
- 갱신 스크립트를 실행합니다. 이 스크립트는 이 확장기능을 필요로 하는 데이터 베이스 테이블을 자동적으로 작성합니다.
- Configure as required.
- 완료 – 위키의 ‘Special:Version’에 이동해서, 확장기능이 올바르게 설치된 것을 확인합니다.
Using MediaWiki-Docker
Follow the steps in MediaWiki-Docker/Extension/CheckUser to install this extension inside a MediaWiki Docker instance.
설정
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 /19
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.
미디어위키 버전: | ≥ 1.43 |
If the extension is installed on a multi-wiki install, then you should set $wgVirtualDomainsMapping for the virtual-checkuser-global
to point to a central database table.
Setting this will ensure that the central index tables are actually on a central DB, and therefore the GlobalBlocking global autoblocks and GUC work.
After doing this, you will need to run update.php
to create the tables on the central wiki.
Troubleshooting Special:GlobalContributions functionality
If Special:GlobalContributions is not returning revisions as expected (e.g. you have revisions on another wiki that you can view on that wiki), a misconfiguration may be causing an internal failure that isn't user-facing (as it cannot be user resolved). Check that:
- Your user has a central account and that their accounts on the affected wiki are linked. This can be checked at Special:MergeAccount.
- The affected wiki is known to the wiki farm. This is defined in the
sites
table and wikis can be added to this table via theaddSite
maintenance script. You'll need to ensure that the optional parameterspagepath
andfilepath
are filled out (eg.php ./maintenance/run.php ./maintenance/addSite.php $wikiName wiki --pagepath https://hostname/wiki/\$1 --filepath https://hostname/w/\$1
), as Special:GlobalContributions uses these to generate API queries and links. - The central database is set with
virtual-checkuser-global
(eg.$wgVirtualDomainsMapping['virtual-checkuser-global'] = [ 'db' => $wiki ];
) and that thecuci_temp_edit
table is recording revisions from the affected wiki. - If necessary, cross-domain cookies should be enabled as the
centralauth
token must work across both wikis.
Granting right to use 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';
설정
매개변수 | 기본값 | comment |
---|---|---|
$wgCUDMaxAge
|
7776000
|
How long to keep CU data (in seconds)? (default = 90 days) |
$wgCheckUserMaxBlocks
|
200
|
대량 차단 한계 |
$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' => 19 ]
|
Smallest CIDR value that can be used 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:
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. |
$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. 예시:
$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. 예시:
$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. 예시:
$wgCheckUserGBtoollink = [
'centralDB' => 'metawiki',
'groups' => [ 'steward', 'staff' ]
];
|
$wgCheckUserEnableSpecialInvestigate (1.35-1.43)
|
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. |
$wgCheckUserLogLogins
|
false
|
Whether CheckUser should log login and logout attempts (both successful and not). |
$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 5,000 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 (1.40)259 (1.41) 769 (1.42-1.43) 768 (1.43)
|
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. |
$wgCheckUserClientHintsEnabled (1.41+)
|
true
|
Used to control whether client hints should be collected and displayed in results by CheckUser. |
$wgCheckUserClientHintsSpecialPages (1.41+)
|
[ "CreateAccount", "Emailuser", "PasswordReset", "Userlogin", "Userlogout" ]
|
The list of SpecialPages where CheckUser will request client hints if $wgCheckUserClientHintsEnabled is true .
|
$wgCheckUserClientHintsActionQueryParameter (1.41+)
|
[ "history" ]
|
The list of "action" values in the query parameters where client hints will be requested. |
$wgCheckUserClientHintsHeaders (1.41+)
|
{ "Sec-CH-UA": "", "Sec-CH-UA-Arch": "architecture", "Sec-CH-UA-Bitness": "bitness", "": "brands", "Sec-CH-UA-Form-Factor": "", "Sec-CH-UA-Full-Version-List": "fullVersionList", "Sec-CH-UA-Mobile": "mobile", "Sec-CH-UA-Model": "model", "Sec-CH-UA-Platform": "platform", "Sec-CH-UA-Platform-Version": "platformVersion", "Sec-CH-UA-WoW64": "" }
|
The list of client hint types that will be requested. Keys represent the client hint values requested using the Accept-CH header. Values represent the equivalent name when requesting them from the JS client side client hints API. |
$wgCheckUserClientHintsUnsetHeaderWhenPossible (1.41+)
|
true
|
If true , the server will send an empty Accept-CH header when the user is viewing a page which does not need client hints data.
|
$wgCheckUserGlobalContributionsCentralWikiId (1.44+)
|
null
|
A string representing the name of the wiki to designate as the "central" wiki for Special:GlobalContributions. Setting this will redirect all other wiki's Special:GlobalContributions page to the central wiki's instead. |
Special:CheckUser 사용량
기본 인터페이스
- Special:CheckUser에 가세요.
- In the user field, type in the username (without the
User:
prefix), IP address, or CIDR range.
- IP: IPv4나 IPv6 주소.
- 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 도움말:대역 차단 .
- 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
- 검색하고자 하는 정보를 선택하세요.
- IP 주소 확인 - #* "아이피 받기": 등록된 사용자에 의해 사용되고있는 아이피를 보여줍니다.
- Get actions - 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.
- 특정 IP를 사용한 사용자 확인 - #* 사용자 이름 받기: IP 범위에서 편집한 사용자 계정을 보여줍니다.
- 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.
-
기초 CheckUser 인터페이스
-
사용자 이름 검사 예시
-
IP 검사 예시
-
Example Get edits check
-
예시 기록
정보 확인
A typical entry in the CheckUser results for a user summary ("get users") is as follows:
- Example (talk | contribs | block) (Check) (20:11, 12 12월 2024 -- 20:12, 12 12월 2024) [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:
- 사용자 이름 (사용자 링크) (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 형식
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).
예시:
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.
개인 도구 링크
When you get results from Special:CheckUser you can add personal user tool links via the following 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)MediaWiki:Checkuser-cidr-tool-links
for IP ranges produced by the CIDR calculator present at the bottom of all Special:CheckUser pages. Interface message added in 1.41.
Special:Investigate의 사용
기본 사용법
- Special:Investigate에 가세요.
- In the 계정 이름과 IP 주소 field, type in up to 10 targets, which may be usernames (without the
User:
prefix), IP addresses, or CIDR ranges. - In the 이유 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.
-
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 및 사용자 에이전트 tab.
Special:IPContributions usage
This page is only available if temporary accounts are known on a wiki (See MainConfigSchema::AutoCreateTempUser
for more information).
It's used to examine the temporary accounts associated with an IP.
To use this page, you must have the right to view IP addresses (checkuser-temporary-account
) and have enabled the preference to view IP addresses (on Special:Preferences, under "임시 계정 IP 표시").
Basic usage
- Go to Special:IPContributions.
- In the IP 주소 또는 대역: field, input an IP (IPv4 or IPv6) or CIDR range.
- Adjust parameters as necessary and submit a search. This action will be logged to the
checkuser-temporary-account
log which will be visible to users with thecheckuser-temporary-account-log
right.
-
Input form
-
Example results
Special: GlobalContributions usage
This page is only available if temporary accounts are known on a wiki (See MainConfigSchema::AutoCreateTempUser
for more information) and Extension:GlobalPreferences is enabled.
Given an IP, it aggregates all revisions from temporary accounts across all wikis within the wiki farm that the user has the right to see.
To use this page, you must have the right to view IP addresses (checkuser-temporary-account
) and have enabled the global preference to view IP addresses (on Special:GlobalPreferences, under "임시 계정 IP 표시").
Basic usage
- Go to Special:GlobalContributions
- In the IP 주소 또는 대역: field, input an IP (IPv4 or IPv6) or CIDR range.
- Adjust parameters as necessary and submit a search. This action will be logged to the
checkuser-temporary-account
log which will be visible to users with thecheckuser-temporary-account-log
right. - Alongside local results, results will be returned for wikis on which you also have the
checkuser-temporary-account
right.
-
Input form
-
Example results
Showing IPs for temporary accounts
미디어위키 버전: | ≥ 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는 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
미디어위키 버전: | ≥ 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.
Response
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.
Example request
GET /rest.php/checkuser/v0/temporaryaccount/*Unregistered%203/revisions/31
Example response
{"ips":{"31":"40.175.36.227"}}
Example request with multiple revisions
GET /w/rest.php/checkuser/v0/temporaryaccount/*Unregistered%205/revisions/194|193
Example response
{"ips":{"194":"40.175.36.227","193":"1.2.3.4"}}
이 확장 기능은 하나 이상의 위키미디어 프로젝트에서 사용 중입니다. 이것은 아마도 이 확장 기능이 안정적이고 트래픽이 많은 웹 사이트에서 사용할 수 있을 만큼 충분히 잘 작동한다는 것을 의미합니다. 설치된 위치를 확인하려면 위키미디어의 CommonSettings.php 및 InitialiseSettings.php 구성 파일에서 이 확장 기능의 이름을 찾습니다. 특정 위키에 설치된 확장 기능의 전체 목록은 위키의 Special:Version 문서에서 볼 수 있습니다. |
This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |