Extension:LoginNotify/zh
The LoginNotify extension notifies you when someone logs into your account. It can be configured to give warnings after a certain number of failed login attempts (The number is configurable, and can be different between unknown IPs/devices and known IPs/devices). It can also give notices (which can also be emailed) for successful logins from IPs you don't normally use. It can optionally integrate into the CheckUser extension in order to determine if the login is from an IP address you don't normally use. It can also set a cookie to try and determine if the login is from a device you normally use.
安裝
此扩展需要安装Echo 扩展。
- 下载,并将解压后的
LoginNotify
移动到extensions/
目录中。
开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/LoginNotify
- 将下列放置在您的LocalSettings.php 的底部:
wfLoadExtension( 'LoginNotify' );
完成 – 在您的wiki上至Special:Version,以验证已成功安装。
This extension can optionally integrate with the CheckUser extension if it is installed, but does not require it.
用法
Once LoginNotify is installed, whenever a user logs into the wiki, their IP subnet is cached on the server and a cookie named loginnotify_prevlogins
is stored in their browser.
These tokens, optionally along with CheckUser tables, are used to see if subsequent logins are coming from a known IP/device.
If CentralAuth and CheckUser are installed, it will check the IP not only for the current wiki, but also the ten wikis where the user is most active.
配置
在文件LocalSettings.php
中可以设置的参数:
名称 | 描述 | |
---|---|---|
$wgLoginNotifyAttemptsKnownIP |
在触发通知之前,从已知IP允许的失败登录尝试次数。 | 10 |
$wgLoginNotifyAttemptsNewIP |
触发通知之前,允许新IP的失败登录尝试次数。 | 3 |
$wgLoginNotifyExpiryKnownIP |
The time-to-live of the count of failed login attempts from a known IP (from the time of the first failed attempt). | 604800 (7天) |
$wgLoginNotifyExpiryNewIP |
The time-to-live of the count of failed login attempts from a new IP (from the time of the first failed attempt). | 1209600 (14天) |
$wgLoginNotifyCheckKnownIPs |
是否在已知IP成功失败后触发通知。 | true |
$wgLoginNotifyEnableOnSuccess |
是否在未知IP成功登录后触发通知。 | true |
$wgLoginNotifyEnableForPriv |
为不同的用户组设置不同的默认通知首选项。 For user groups that have any of the user rights listed in this array, the preferences specified in Hooks:getOverridenOptions() are on by default. ("Failed login attempts" web notifications and "Login from new computer" web notifications.) | [ "editinterface", "userrights" ] |
$wgLoginNotifySecretKey |
Use this key instead of $wgSecretKey to generate the HMACs for the cookie. |
null |
$wgLoginNotifyCookieExpire |
Cookie到期。 | 15552000 (180天) |
$wgLoginNotifyCookieDomain |
To allow sharing login cookies between sites on different subdomains, set this to the parent domain name. | null |
$wgLoginNotifyMaxCookieRecords |
Maximum number of users (records) to track as having successfully logged in on a particular device. | 6 |
$wgLoginNotifyCacheLoginIPExpiry |
How long to cache IPs in memcache. Set to false to disable; set to 0 to cache forever. |
5184000 (60天) |
![]() | 此用于一个或多个维基媒体项目。 这可能意味着足够稳定、运作足够良好,可以用在这样的高流量的网站上。 请在维基媒体的CommonSettings.php和InitialiseSettings.php中查找此的名称以查看哪些网站安装了该。 特定wiki上的已安装的的完整列表位于Special:Version页面。 |
![]() | 此在以下wiki农场/托管网站和/或软件包中提供:
|