Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Extension:CheckUser

From mediawiki.org
Translate this page
Languages:
This page is about the installing the extension itself. For the Wikimedia Foundation CheckUser policy, seem:CheckUser policy. For details on how to use the extension, seeHelp:Extension:CheckUser.
MediaWiki extensions manual
CheckUser
Release status: stable
ImplementationSpecial page,User identity,API,Hook,Database
DescriptionCheckUser 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.
Author(s)Tim Starling,Aaron Schulz,Dreamy Jazz
Latest version2.5 (continuous updates)
Compatibility policySnapshots releases along with MediaWiki. Master is not backward compatible.
PHP7.4.3+
Database changesYes
Virtual domainvirtual-checkuser-global
Tablescu_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
cusi_case
cusi_signal
cusi_user
LicenseGNU General Public License 2.0 or later
Download
HelpHelp:Extension:CheckUser
  • $wgCheckUserGBtoollink
  • $wgCheckUserCAMultiLock
  • $wgCheckUserClientHintsEnabled
  • $wgCheckUserUserInfoCardCentralWikiId
  • $wgCheckUserLogLogins
  • $wgCheckUserDeveloperMode
  • $wgCheckUserCollapseCheckUserHelperByDefault
  • $wgCheckUserMaxBlocks
  • $wgCheckUserGroupRequirements
  • $wgCheckUserSuggestedInvestigationsHidden
  • $wgCheckUserClientHintsValuesToHide
  • $wgCheckUserAlwaysSetClientHintHeaders
  • $wgCheckUserClientHintsSpecialPages
  • $wgCheckUserLogSuccessfulBotLogins
  • $wgCheckUserWriteToCentralIndex
  • $wgCUPublicKey
  • $wgCheckUserCAtoollink
  • $wgCheckUserClientHintsRestApiMaxTimeLag
  • $wgCheckUserSpecialPagesWithoutIPRevealButtons
  • $wgCheckUserCentralIndexRangesToExclude
  • $wgCheckUserSuggestedInvestigationsEnabled
  • $wgCheckUserCentralIndexGroupsToExclude
  • $wgCheckUserMaximumIPsToAutoblock
  • $wgCheckUserEnableUserInfoCardInstrumentation
  • $wgCheckUserUserInfoCardFeatureVisible
  • $wgCheckUserGlobalContributionsCentralWikiId
  • $wgCheckUserForceSummary
  • $wgCheckUserInvestigateMaximumRowCount
  • $wgCheckUserDisableCheckUserAPI
  • $wgCheckUserClientHintsUnsetHeaderWhenPossible
  • $wgCheckUserCuciUserRandomChanceDebounceCutoff
  • $wgCUDMaxAge
  • $wgCheckUserCIDRLimit
  • $wgCheckUserMaximumRowCount
  • $wgCheckUserTemporaryAccountMaxAge
  • $wgCheckUserClientHintsForDisplay
  • $wgCheckUserClientHintsHeaders

  • checkuser
  • checkuser-log
  • checkuser-temporary-account
  • checkuser-temporary-account-auto-reveal
  • checkuser-temporary-account-log
  • checkuser-temporary-account-no-preference
  • investigate
Translate the CheckUser extension if it is available at translatewiki.net
IssuesOpen tasks ·Report a bug

CheckUser is an extension that allows a user (with thecheckuser permission) to check whichIP 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.

Updates will be made according to the needs of Wikimedia Foundation wikis; or where critical vulnerabilities are discovered. Details on how to use the tools provided by the extension are atHelp:Extension:CheckUser.

Installation

[edit]
This extensioncomes with MediaWiki 1.44 and later, so you do not need to download it. The remaining configuration instructions must still be followed.
  • Download and move the extractedCheckUser folder to yourextensions/ directory.
    Developers and code contributors should install the extensionfrom Git instead, using:
    cdextensions/gitclonehttps://gerrit.wikimedia.org/r/mediawiki/extensions/CheckUser
  • Only when installing from Git, runComposer to install PHP dependencies, by issuingcomposer install --no-dev in the extension directory.(SeeT173141 for potential complications.)
  • Add the following code at the bottom of yourLocalSettings.php file:
    wfLoadExtension('CheckUser');
  • Run theupdate script which will automatically create the necessary database tables that this extension needs.
  • Configure as required.
  • YesDone – Navigate toSpecial:Version on your wiki to verify that the extension is successfully installed.

Using MediaWiki-Docker

[edit]

Follow the steps inMediaWiki-Docker/Extension/CheckUser to install this extension inside a MediaWiki Docker instance.

Configuration

[edit]

This tool copies recent changes data to separate tables, and adds to that when new entries are added.If$wgPutIPinRC is set tofalse, 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 totrue.If you have bot accounts on your wiki, setting$wgCheckUserLogSuccessfulBotLogins tofalse will skip logging successful login attempts to bot accounts.

MediaWiki version:
1.43

If the extension is installed on a multi-wiki install, then you should set$wgVirtualDomainsMapping for thevirtual-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 theGlobalBlocking global autoblocks and GUC work.After doing this, you will need to runupdate.php to create the tables on the central wiki.

MediaWiki version:
1.45

After 1.45, the CheckUser API is disabled by default.If you want to enable this you should set$wgCheckUserDisableCheckUserAPI tofalse.

Troubleshooting Special:GlobalContributions functionality

[edit]

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 thesites 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 (e.g.php ./maintenance/run.php addSite globalId groupName --pagepathhttps://hostname/wiki/\$1 --filepathhttps://hostname/w/\$1), as Special:GlobalContributions uses these to generate API queries and links.
  • The central database is set withvirtual-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 thecentralauth token must work across both wikis.

Granting right to use CheckUser

[edit]

To grant the right to useSpecial:CheckUser,Special:Investigate andSpecial:CheckUserLog, a user with user rights management must go toSpecial: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 inSpecial:SpecialPages page for that user.

To allow users to access the IP addresses oftemporary accounts, they should be granted thecheckuser-temporary-account right.

To give sysops all the rights this extension provides, put the following intoLocalSettings.php:

$wgGroupPermissions['sysop']['checkuser']=true;$wgGroupPermissions['sysop']['checkuser-log']=true;$wgGroupPermissions['sysop']['investigate']=true;$wgGroupPermissions['sysop']['checkuser-temporary-account-log']=true;$wgGroupPermissions['sysop']['checkuser-temporary-account-no-preference']=true;

To only allow the adding and removing of thecheckuser permission, use the following instead:

$wgAddGroups['sysop'][]='checkuser';$wgRemoveGroups['sysop'][]='checkuser';

Updating

[edit]
MediaWiki version:
1.45

Since MediaWiki 1.45, GuidedTour is removed from Special:Investigate, so the preferencescheckuser-investigate-tour-seen andcheckuser-investigate-form-tour-seen are no longer used.If Special:Investigate was used before upgrading to 1.45, these preferences may be stored unnecessarily for some users.To remove these preferences from theuser_properties table, run the maintenance scripts:

$phpmaintenance/run.phpuserOptions.phpcheckuser-investigate-tour-seen--delete$phpmaintenance/run.phpuserOptions.phpcheckuser-investigate-form-tour-seen--delete

Configuration

[edit]

A selected number of the configuration values are shown below.These configuration values are useful for administrators of wikis to modify.Configuration values which are usually left as their default value are not specified here to keep the list concise, but details for these configuration values are present in theextension.json file.

Selected configuration settings inextension.json
Configuration nameDefault valueDetail
$wgCUDMaxAge7776000 (90 days)How long to keep CU data (in seconds)
$wgCheckUserMaxBlocks200Maximum number of users that can be mass blocked simultaneously onSpecial:Investigate
$wgCheckUserForceSummaryfalseSet this totrue 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:

openssl genrsa -out cu.key 2048; openssl rsa -in cu.key -pubout > cu.pub and paste the contents ofcu.pub here

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.

$wgCheckUserCAMultiLockfalseThis can be used to add a link to Special:MultiLock by CentralAuth to the Special:CheckUser's mass block form. This requires theCentralAuth 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']];
$wgCheckUserCAtoollinkfalseSince77360f1cf1d2. This adds a link to central wiki Special:CentralAuth to the Special:CheckUser's "Get users" results. This requires theCentralAuth extension to be installed on the wiki. To enable this, set this with a central wiki's database name. For example:
$wgCheckUserCAtoollink='metawiki';
$wgCheckUserGBtoollinkfalseSince77360f1cf1d2. This adds a link to local or central wiki Special:GlobalBlock to the Special:CheckUser's "Get users" results. This requires theGlobalBlocking 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 haveCentralAuth installed) group(s) to add the link for. For example:
$wgCheckUserGBtoollink=['centralDB'=>'metawiki','groups'=>['steward','staff']];
$wgCheckUserEnableSpecialInvestigate (1.35-1.43)false (<=1.39)
true (1.40+)
Since57dcfe46d2e4. This enables Special:Investigate, an updated version of Special:CheckUser that allows checking for multiple user accounts and IP addresses within one investigation.
$wgCheckUserLogLoginsfalseWhether CheckUser should log login and logout attempts (both successful and not).
$wgCheckUserLogSuccessfulBotLoginstrueWhether CheckUser should store successful login attempts to accounts with the bot user group if $wgCheckUserLogLogins is set totrue. Only is used if $wgCheckUserLogLogins istrue
$wgCheckUserMaximumRowCount5000The 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
$wgCheckUserInvestigateMaximumRowCount25000Similar to $wgCheckUserMaximumRowCount, but for Investigate
$wgCheckUserCollapseCheckUserHelperByDefault (1.41+)2500Controls when the "CheckUser helper" summary table onSpecial:CheckUser. Specifytrue to always collapse by default,false to never collapse by default, and a number to collapse when more than that number of results are displayed on the page.
$wgCheckUserMaximumIPsToAutoblock (1.43+)1The maximum number of IP addresses to retroactively autoblock when a block is created with autoblocking enabled.
$wgCheckUserClientHintsEnabled (1.41+)trueUsed to control whether client hints should be collected and displayed in results by CheckUser.
$wgCheckUserClientHintsSpecialPages (1.41+){"CreateAccount":"header","Emailuser":"js","PasswordReset":"js","Userlogin":["js","header"],"Userlogout":"header"}The list of special pages where CheckUser will request client hints if$wgCheckUserClientHintsEnabled istrue.
$wgCheckUserClientHintsHeaders (1.41+){"Sec-CH-UA":"brands","Sec-CH-UA-Arch":"architecture","Sec-CH-UA-Bitness":"bitness","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 theAccept-CH header. Values represent the equivalent name when requesting them from the JS client side client hints API.
$wgCheckUserClientHintsForDisplay (1.41+)["model","fullVersionList","platformVersion","platform","brands","formFactor","architecture","mobile","bitness","woW64"]The list of Client Hints data to display in CheckUser results. The order of the array is used to determine what order to display the data.
$wgCheckUserClientHintsValuesToHide (1.41+){"architecture":["x86"],"bitness":["64"],"woW64":[false]}Specifies Client Hint data values which should be hidden in the CheckUser results. This is done to hide commonly seen Client Hint data values in the cases where it's not useful to see this information unless it's a rare value.
$wgCheckUserTemporaryAccountMaxAge (1.40+)86400The number of seconds for which the temporary account API response is fresh.
$wgCheckUserSpecialPagesWithoutIPRevealButtons (1.40+)["Investigate","InvestigateBlock","CheckUser","CheckUserLog","Activeusers","Listusers","BlockList"]A list of special page names where "Show IP" buttons are disabled, because they are not useful. The special page names are case sensitive and do not always match their appearance in the URL. For exampleSpecial:ListUsers is calledListusers in this array.
$wgCheckUserClientHintsUnsetHeaderWhenPossible (1.41+)trueIftrue, the server will send an emptyAccept-CH header when the user is viewing a page which does not need client hints data.
$wgCheckUserGlobalContributionsCentralWikiId (1.44+)nullA 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.
$wgCheckUserWriteToCentralIndex (1.43+)trueUsed to prevent adding entries to the CheckUser central index tables on the wiki. Use this when the wiki is not part of a larger wiki farm unified account system.
$wgCheckUserCentralIndexGroupsToExclude (1.43+)["bot"]Users in any of the groups specified in this configuration value will not have their actions stored in the central index tables. Used to reduce the rate of writes to the central index tables for high activity users where there is no need to run CheckUser checks on these users. Users in these group are still checkable and have their IP and user agent logged.

API

[edit]

See sectionbelow.

Using extension CheckUser

[edit]

Detail about how to use the extension can be viewed atHelp:Extension:CheckUser.This information is not included here to keep this page manageable in size, and to focus this page on installation and administration of the extension.

There are several special pages and a few APIs provided by the extension. The special pages are:

  • Special:CheckUser – Used to look up CheckUser data about accounts and anonymous users. Described atHelp:Extension:CheckUser.
  • Special:Investigate – Alternative tool used to look up CheckUser data about accounts and anonymous users, with information displayed using a single-page format. Described atHelp:Special Investigate.
  • Special:CheckUserLog – Used to list the checks performed using either Special:CheckUser, Special:Investigate, or the CheckUser API. Described atHelp:Extension:CheckUser.
  • Special:IPContributions – Used to lookup edits performed by temporary accounts on a given IP address or range. Described atHelp:Extension:CheckUser.
  • Special:GlobalContributions – Used to lookup edits performed by accounts, or temporary accounts on a given IP address or range. Described atHelp:Extension:CheckUser.

The extension also provides the ability to reveal the IP address used by a temporary account. Described atHelp:Extension:CheckUser.

This extension is being used on one or moreWikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia'sCommonSettings.php andInitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki'sSpecial:Version page.
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.
Retrieved from "https://www.mediawiki.org/w/index.php?title=Extension:CheckUser&oldid=7997387"
Categories:
Hidden category:

[8]ページ先頭

©2009-2025 Movatter.jp