Extension:CheckUser

From mediawiki.org
This page is a translated version of the page Extension:CheckUser and the translation is 32% complete.
Outdated translations are marked like this.
Manual de extensiones de MediaWiki
CheckUser
Estado de lanzamiento: estable
Implementación Página especial , Identidad de usuario , API , Gancho , Base de datos
Descripción La función de CheckUser (también conocida como VerificarUsuario) permite a un usuario con los respectivos permisos, comprobar qué direcciones IP son utilizadas por un determinado nombre de usuario o que nombres de usuario son utilizados por una determinada IP, sin tener que ejecutar consultas directamente a mano contra la base de datos.
Autor(es) Tim Starling, Aaron Schulz, Dreamy Jazz
Última versión 2.5 (continuous updates)
Política de compatibilidad Lanzamientos de screenshots junto con MediaWiki. Master no es compatible con versiones anteriores.
MediaWiki 1.39+
PHP 7.4.3+
Cambios de la base de datos
Tablas cu_changes
cu_log_event
cu_private_event
cu_log
cu_useragent_clienthints
cu_useragent_clienthints_map
cu_useragent
Licencia GNU Licencia Pública general 2.0 o posterior
Descarga
  • $wgCheckUserGBtoollink
  • $wgCheckUserClientHintsSpecialPages
  • $wgCheckUserCAMultiLock
  • $wgCheckUserLogSuccessfulBotLogins
  • $wgCheckUserLogLogins
  • $wgCUPublicKey
  • $wgCheckUserCAtoollink
  • $wgCheckUserClientHintsRestApiMaxTimeLag
  • $wgCheckUserDeveloperMode
  • $wgCheckUserClientHintsForDisplay
  • $wgCUDMaxAge
  • $wgCheckUserCIDRLimit
  • $wgCheckUserMaxBlocks
  • $wgCheckUserPurgeOldClientHintsData
  • $wgCheckUserDisplayClientHints
  • $wgCheckUserClientHintsUnsetHeaderWhenPossible
  • $wgCheckUserForceSummary
  • $wgCheckUserEnableSpecialInvestigate
  • $wgCheckUserLogAdditionalRights
  • $wgCheckUserCollapseCheckUserHelperByDefault
  • $wgCheckUserClientHintsValuesToHide
  • $wgCheckUserClientHintsEnabled
  • $wgCheckUserMaximumRowCount
  • $wgCheckUserInvestigateMaximumRowCount
  • $wgCheckUserTemporaryAccountMaxAge
  • $wgCheckUserEventTablesMigrationStage
  • $wgCheckUserClientHintsHeaders

  • checkuser
  • checkuser-log
  • checkuser-temporary-account
  • investigate
Descargas trimestrales 217 (Ranked 32nd)
Wikis públicos que lo utilizan 9,118 (Ranked 13th)
Traduce la extensión CheckUser si está disponible en translatewiki.net
Asuntos Tareas abiertas · Reportar un bug
Esta página es sobre la extensión. Para la Política de CheckUser de la Fundación Wikimedia, vea m:CheckUser policy.

CheckUser es una extensión que permite a un usuario (con el permiso de checkuser) comprobar qué direcciones IP son utilizadas por un nombre de usuario y que nombres de usuario son utilizados por una IP determinada, sin tener que ejecutar consultas directamente a mano contra la base de datos. La extensión se está ejecutando en vivo en todas las wikis de Wikimedia.

Las actualizaciones se realizan de acuerdo a las necesidades de las wikis de Wikimedia; o cuando se descubren vulnerabilidades críticas.

Instalación

  • Descarga y extrae los archivos en un directorio denominado «CheckUser» dentro de la carpeta extensions/.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CheckUser
  • Cuando se efectúa la instalación desde Git, hay que ejecutar Composer para que se instalen las dependencias de PHP; para este efecto, ejecute composer install --no-dev en el directorio de la extensión. (ver task T173141 para complicaciones potenciales)
  • Añade el siguiente código en la parte final de tu archivo LocalSettings.php :
    wfLoadExtension( 'CheckUser' );
    
  • Ejecuta la secuencia de actualización, que creará automáticamente las tablas de la base de datos que necesita esta extensión.
  • Configure as required.
  • Yes Hecho – Navega a Special:Version en el wiki para verificar que la extensión se haya instalado correctamente.

Using MediaWiki-Docker

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

Configuración

Esta herramienta migra los datos de cambios recientes por separado en una $changes table, y se suma a que cuando se añaden nuevas entradas. Si $PutlPinRC era anteriormente false, no habrá datos iniciales para buscar, pero las nuevas ediciones se completarán tan pronto como la extensión sea configurada. However, entries added after installation of this extension will contain the IP address.

Después de ejecutar las consultas, puedes reducir $wgRCMaxAge para mostrar los cambios recientes sin afectar checkuser. Usa $wgCUDMaxAge para establecer en qué medida los datos del usuario pueden ser comprobados de nuevo, en cuestión de segundos.

En versiones de MediaWiki 1.22 hacia adelante, ComprobarUsuario establece una configuración concreta $wgCheckUserCIDRLimit determina la gama más grande que puede ser comprobada en un solo control. Su formato es el mismo en $wgBlockCIDRLimit De lo contrario, el límite predeterminado (para todas las versiones) es /32 por IPv6 cheques y /16 por IPv4 cheques.

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.

Concediendo el derecho de utilizar ComprobarUsuario

Para conceder el derecho de utilizar la herramienta ComprobarUsuario, un usuario con derechos de administrador tiene que ir a Special:UserRights e introducir el nombre de usuario en la caja, y por último seleccionar la opción "comprobador de usuario". Una vez hecho esto, la opción de ComprobarUsuario aparecerá en la página de Special:SpecialPages para aquel usuario.

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

Para activar la gestión de derechos de usuario para los administradores, escriba lo siguiente en LocalSettings.php:

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

Para permitir solo la adición y eliminación del permiso de checkuser, utilice lo siguiente en su lugar:

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

Configuración

Preferencias de configuración en extension.json
parámetro por defecto comentario
$wgCUDMaxAge 7776000 Cuánto tiempo para mantener CU dato (en segundos)? (default = 3 meses)
$wgCheckUserMaxBlocks 200 Límites de bloqueo máximo
$wgCheckUserForceSummary false Establecer esta propiedad a true si desea forzar a los usuarios de verificación para que den una razón para cada verificación que se realiza a través de Special:CheckUser. (No es muy útil, ya que los comprobadores podrían dar simplemente un resumen tales como "necesitan ser comprobados" o "me da la gana" y el software no lo sabría.)
$wgCheckUserCIDRLimit [ 'IPv4' => 16, 'IPv6' => 19 ] Cortos límites CIDR que se pueden comprobar en una verificación de rango
$wgCUPublicKey '' Clave pública para cifrar datos privados que pueden necesitar para ser leído más tarde. Generar una clave pública con algo como:

openssl genrsa -out cu.key 2048; openssl rsa -in cu.key -pubout > cu.pub y pega los contenidos de cu.pub aquí

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 Esto puede ser utilizado para añadir un enlace a Especial:MultiLock de CentralAuth a la forma de bloque masivo en Especial:ComprobarUsuario. Esto requiere que la extensión Extensión:CentralAuth este instalada en el 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. Por ejemplo:
$wgCheckUserCAMultiLock = [
    'centralDB' => 'metawiki',
    'groups' => [ 'steward' ]
];
$wgCheckUserCAtoollink false Desde 77360f1cf1d2. This adds a link to central wiki Special:CentralAuth to the Special:CheckUser's "Get users" results. This requires the Extensión:CentralAuth extension to be installed on the wiki. To enable this, set this with a central wiki's database name. Por ejemplo:
$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 Extensión:CentralAuth installed) group(s) to add the link for. Por ejemplo:
$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.
$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 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.
$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.


Uso de Especial:ComprobarUsuario

Interfaz básica

  1. Vaya a Especial:ComprobarUsuario.
  2. En el campo usuario, escriba un nombre de usuario (sin el prefijo User:), dirección IP o rango CIDR.
    • IP: cualquier dirección IPv4 o 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. Para notación, véase Ayuda:Bloqueos por intervalos de IP .
    • XFF: Puedes comprobar una dirección IP cliente proporcionada por X-Forwarded para encabezamientos se debe anteponer /xff (por ejemplo, 127.0.0.1/xff).
  3. Seleccione la información que desea obtener.
    • Obtener direcciones IP - #* Obtener IPs: obtiene las direcciones IP utilizadas por un usuario registrado.
    • Obtener acciones - #* Obtener ediciones de IP: obtiene todas las ediciones (registradas o anonimas) realizadas en una determinada dirección IP o rango.
    • Obtener usuarios - #* Obtener usuarios: obtiene los usuarios que han editado en esa dirección IP o rango.
  1. En el campo "razón" escribe la razón por la que estás accediendo a ese dato confidencial.

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.


Información obtenida

Una entrada típica en el resultado CheckUser para un resumen de usuario ("get users") es el siguiente:


  1. Example user agent

Esto está formateado para adecuar una gran cantidad de información a un formato que puede ser muy fácilmente listado y ojeado, pero es difícil de leer a menos que sepas cuál es la información proporcionada: The information is laid out as follows:

  • Nombre de usuario (user links) (time period when they edited from the given IP or range) [number of edits from the IP or range]
    1. IP address edited from XFF: XFF information provided (can be spoofed)

Cada combinación IP / XFF utilizada para editar aparece en la lista, por orden de utilización.

Las últimos diez aplicaciones de usuario (navegador, sistema operativo, idioma del sistema y las versiones) para cada usuario, las modificaciones realizadas en el IP o el intervalo se enumeran después.

Formato XFF

XFF (X-Forwarded-For) encabezados indican la serie de direcciones IP utilizadas desde el ordenador del usuario (primero) al último servidor proxy. In case of Wikimedia, the last proxy server is one of the Wikimedia proxies (listed under $wgCdnServersNoPurge in the Wikimedia configuration file).

En este ejemplo:

aaa.aaa.aaa.aaa XFF: 10.4.46.42, 127.0.0.1, aaa.aaa.aaa.aaa, 208.80.152.46

  • las primeras dos direcciones (10.4.46.42, 127.0.0.1) son privadas para la red de origen y no pueden alcanzarse directamente desde la Internet pública,
  • 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).

Ajustes de configuración de MediaWiki $wgUsePrivateIPs , $wgCdnServers , $wgCdnServersNoPurge y de extensiones que utilizan el gancho IsTrustedProxy (como Extension:TrustedXFF ) cambiar la forma en que se selecciona una dirección IP real que se utiliza para atribuir al editor.

Personal tool links

When you get results from Special:CheckUser you can add personal user tool links via the following interface messages:

  • 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 usage

Basic usage

  1. Go to Special:Investigate.
  1. In the Nombres de usuario y direcciones IP field, type in up to 10 targets, which may be usernames (without the User: prefix), IP addresses, or CIDR ranges.
  2. In the Motivo 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.

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 Direcciones IP y agentes de usuario tab.


Showing IPs for temporary accounts

Versión de 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

ComprobarUsuario también proporciona una 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

Versión de 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.

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"}}