Extension:CheckUser
| CheckUser リリースの状態: 安定 |
|||
|---|---|---|---|
| 実装 | Special page, User identity | ||
| 説明 | CheckUser機能を使用すると、権限を持つユーザーは、指定されたユーザー名で使用されているIPと、特定のIPで使用されているユーザー名を手動で照会する必要がなくなります。 | ||
| 作者 | Tim Starling, Aaron Schulz | ||
| 最新バージョン | 2.4 (continuous updates) | ||
| 互換性ポリシー | リリースブランチ | ||
| MediaWiki | 1.27+ | ||
| PHP | 5.4+ | ||
| データベースの変更 | はい | ||
| テーブル | cu_changes cu_log |
||
| ライセンス | GNU General Public License 2.0 or later | ||
| ダウンロード | |||
|
|||
|
|||
| translatewiki.net で翻訳を利用できる場合は、CheckUser 拡張機能の翻訳にご協力ください | |||
| 使用状況とバージョン マトリクスを確認してください。 | |||
| 問題点 | 未解決のタスク · バグを報告 | ||
- このページは拡張機能そのものに関するものです。Wikimedia Foundation CheckUserポリシーについては、m:CheckUser policyを参照してください。
CheckUserは指定された利用者名で使用されているIPと、特定のIPで使用されている利用者名を確認する権限を特定の利用者に付与する拡張機能です。手作業でデータベースに対してクエリを直接実行する必要はありません。 この拡張機能は、WikimediaのすべてのWikiで実行されています。
Contents
ダウンロード
拡張機能は、Git から直接取得できる場合があります [?]:
- コードを参照
- 一部の拡張機能には安定版リリースのタグがあります。
- タグを参照
- タグを選択します
- 「スナップショット」をクリックします
- 各ブランチは過去の MediaWiki リリースと関連付けられています。 最新のアルファ バージョンを含む「master」ブランチもあります (MediaWiki のアルファ バージョンが必要な場合用)。
- ブランチを参照
- ブランチ名を選択します
- 「続行」をクリックします
スナップショットを展開して、MediaWiki インストレーション内の extensions/CheckUser/ ディレクトリに配置します。
git に馴染みがあり、かつサーバーにシェルでアクセスできる場合は、拡張機能を以下のようにして取得することもできます:
cd extensions/
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CheckUser.git
インストール
拡張機能は、GNU General Public License 2.0以降でリリースされています。 ソフトウェアは現状のまま提供されます。 ウィキメディアのウィキのニーズに合わせて、または重大な脆弱性が発見された場所が更新されます。
既存のwiki
基本
php maintenance/update.phpを実行せずに他の拡張機能をインストールした場合は、まずそれを実行してください。
- ダウンロードして、ファイルを
extensions/フォルダー内のCheckUserという名前のディレクトリ内に配置します。
- 以下のコードを LocalSettings.php の末尾に追加します:
wfLoadExtension( 'CheckUser' );
- MediaWiki 1.27 以前を稼働させている利用者へ:
- PuTTYなどのtelnet/sshクライアントプログラムを使用して、extensions/CheckUserフォルダに移動して
php install.phpを実行します。 PHPバージョン5.xをインストールしていることを確認してください。そうしないと、このスクリプトは実行されません。 install.phpが存在しない場合は、php maintenance/update.phpを再度実行してください。 結果は次のようになります。
...cu_changes table added. ...doing rc_id from 368856 to 368955.... ... ...cu_changes table added and populated. ...cu_log added ...logging disabled, skipping log import.
完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
MediaWiki 1.24 以前を稼働させている利用者へ:
上記の手順では、wfLoadExtension() を使用してこの拡張機能をインストールする新しい方法を記載しています。 この拡張機能をこれらの過去のバージョン (MediaWiki 1.24 以前) にインストールする必要がある場合は、wfLoadExtension( 'CheckUser' ); の代わりに以下を使用する必要があります:
require_once "$IP/extensions/CheckUser/CheckUser.php";
コマンドプロンプトへのアクセスなしでのインストール
多くのホスティングプロバイダはシェルへの直接アクセスを許可していませんが、cronジョブの作成を許可しています(例:cPanel Webインターフェイス経由)。
これらのホスティングプロバイダのために、一時的なcronジョブをphp /path/to/install.phpを実行するために使用することができます(当然、/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:
- cu_changes.sqlとcu_log.sqlをダウンロードします
- phpMyAdminで、左側のmediawikiに使用しているデータベースをクリックします
- 次の画面で、上部にある「インポート」タブをクリックします。
- 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.
設定
This tool migrates recent changes data to a separate cu_changes table, 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.
In versions for MediaWiki 1.22 and later, the CheckUser-specific setting $wgCheckUserCIDRLimit determines the largest range that can be checked in a single check. Its format is the same as $wgBlockCIDRLimit. Otherwise, the default limit (for all versions) is /32 for IPv6 checks and /16 for IPv4 checks.
CheckUsers using Mozilla Firefox can add this JS script to their .js file.
It makes retrieving IP WHOIS data easier.
It requires applets.codebase.principle support (about:config) enabled.
(This can be signed.applets.codebase_principle_support in Firefox 3)
チェックユーザーの使用権の付与
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 "Check User". Once this is done, the Check User option will show up on the Special pages 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;
To only allow the adding and removing of the checkuser permission, use the following instead:
$wgAddGroups['sysop'][] = 'checkuser';
$wgRemoveGroups['sysop'][] = 'checkuser';
設定
| パラメーター | 既定値 | コメント |
|---|---|---|
$wgCUDMaxAge
|
7776000
|
CUデータを保存する時間(秒単位) (既定値=3ヶ月) |
$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:
`openssl genrsa -out cu.key 2048; openssl rsa -in cu.key -pubout > cu.pub` and paste the contents of cu.pub here |
$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' ]
];
|
使用法
基本のインターフェイス
- 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 revision 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 revision rECHU9d7c239bf88866eca577f3241194d440f94fa014). For notation, see Range blocks.
- XFF: you can check a client IP address provided by X-Forwarded-For headers by appending /xff (for example, 127.0.0.1/xff).
- Select the information you want to retrieve.
- Get IPs: returns IP addresses used by a registered user.
- Get edits from IP: returns all edits and logged actions made by a user (registered or anonymous) from an IP address or range.
- Get users: returns user accounts that have edited from an IP or range.
- In the reason 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
Information returned
A typical entry in the CheckUser results for a user summary ("get users") is as follows:
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 $wgSquidServersNoPurge 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 dialup 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, $wgSquidServers, $wgSquidServersNoPurge 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-ipfor IP addresses (for example m:Mediawiki:checkuser-userlinks-ip)Mediawiki:Checkuser-userlinksfor registered users (for example m:Mediawiki:Checkuser-userlinks)
エラー メッセージ
- database query syntax error
If you receive an error message like this when you try to save a page:
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "efUpdateCheckUserData". Database returned error "1146: Table 'cu_changes' doesn't exist (localhost)".
This means that CheckUser has not been installed correctly. In this case you forgot to create the necessary cu_changes table in your database.
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
| この拡張機能は 1 つ以上のウィキメディアのプロジェクトで使用されています。 これはおそらく、この拡張機能が安定していて高いトラフィックのウェブサイトでも十分に動作することを意味します。 この拡張機能がインストールされている場所を確認するには、ウィキメディアの設定ファイル CommonSettings.php および InitialiseSettings.php 内で、この拡張機能の名前を探してください。 特定のウィキにインストールされている拡張機能の完全な一覧は、そのウィキの Special:Version ページにあります。 |
- GPL licensed extensions/ja
- Stable extensions/ja
- Special page extensions/ja
- User identity extensions/ja
- Extensions in Wikimedia version control/ja
- Extensions which add rights/ja
- RecentChange save extensions/ja
- EmailUser extensions/ja
- AuthPluginAutoCreate extensions/ja
- ParserTestTables extensions/ja
- LoadExtensionSchemaUpdates extensions/ja
- ContributionsToolLinks extensions/ja
- ArticleEditUpdatesDeleteFromRecentchanges extensions/ja
- LoggableUserIPData extensions/ja
- AddNewAccount extensions/ja
- All extensions/ja
- Extensions used on Wikimedia/ja
- Log extensions/ja
- API extensions/ja