扩展:LoginNotify
LoginNotify 发行状态: 稳定版 |
|
---|---|
实现 | 用户活动 |
描述 | 通知用户有可疑登录 |
作者 | Brian Wolff (Bawolff留言) |
最新版本 | 0.1 |
MediaWiki | >= 1.43 |
数据库更改 | 是 |
表 | loginnotify_seen_net |
许可协议 | MIT授權條款 |
下載 | |
|
|
季度下載量 | 23 (Ranked 116th) |
正在使用的公开wiki数 | 904 (Ranked 277th) |
前往translatewiki.net翻譯LoginNotify扩展 | |
問題 | 开启的任务 · 报告错误 |
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 Echo 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农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此扩展。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |