扩展:AntiSpoof
Jump to navigation
Jump to search
AntiSpoof 发布状态: 稳定版 |
|
---|---|
![]() |
|
实现 | 使用者動態 |
描述 | 防止创建混淆的用户名。 |
作者 | Brion Vibber (Brion VIBBER讨论) |
兼容性方针 | Snapshots releases along with MediaWiki. Master is not backwards compatible. |
MediaWiki | 1.25+ |
数据庫更改 | 是 |
表 | spoofuser |
许可协议 | GNU通用公眾授權條款2.0或更新版本 |
下载 | |
|
|
|
|
翻譯AntiSpoof擴充功能如在translatewiki.net可用 | |
问题 | 尚未完成的工作 · 回報錯誤 |
AntiSpoof是防止创建混淆用户名的扩展。 它可以阻止使用混合脚本创建令人困惑和类似用户名的帐户。
例如,如果用户John Doe已经注册,则扩展将阻止尝试注册:
- joHn dOE (capital letters in different places)
- Jοhn Doe (Jοhn中的"ο"是希腊语的小写字母。)
- John Dоe (Dоe中的"о"是西里尔字母中小写的O。)
- Јohn Doe ("Ј" in Јohn is Cyrillic capital letter Je)
- John Đoe ("Đ" in Đoe is Latin capital letter D with stroke)
- Jóhn Doe ("ó" in Jóhn is Latin small letter O with acute)
- John Doe (there is a Zero-width space before Doe)
- Jøhn Doe ("ø" in Jøhn is Scandinavian oe)
- J0hn Doe ("0"是阿拉伯数字0)
等等
安装
- 下载文件,并将其放置在您
extensions/
文件夹中的AntiSpoof
目录内。 - 将下列代码放置在您的LocalSettings.php的底部:
wfLoadExtension( 'AntiSpoof' );
- 运行更新脚本,它将自动创建此扩展必须依赖的数据库表。
- 如果用户账户存储在一个共享的数据库中,则添加:
$wgSharedTables[] = 'spoofuser';
- Run the
batchAntiSpoof.php
script from the command line to pre-populate the spoofuser table with your wiki's existing usernames.
php extensions/AntiSpoof/maintenance/batchAntiSpoof.php
完成 – 在您的wiki上导航至Special:Version,以验证扩展已成功安装。
致使用MediaWiki 1.24或更早版本的用户:
上面的说明介绍的是安装此扩展的新方法,它使用wfLoadExtension()
。
如果您需要在早期版本(MediaWiki 1.24和更早版本)中安装此扩展,而不是wfLoadExtension( 'AntiSpoof' );
,您需要使用:
require_once "$IP/extensions/AntiSpoof/AntiSpoof.php";
- To verify that it's working, try creating an account for username "Adm1n"; most wikis have an "Admin" account and so AntiSpoof should reject this lookalike username with a message like "The name Adm1n is too similar to the existing account: Admin".
When installing from Git, please note that this extension requires Composer.
So, after installation from Git change to the directory containing the extension e.g. "../extensions/AntiSpoof/" and run composer install --no-dev
, or when updating: composer update --no-dev
.
Alternatively as well as preferably add the line "extensions/AntiSpoof/composer.json"
to the "composer.local.json" file in the root directory of your wiki like e.g.
{
"extra": {
"merge-plugin": {
"include": [
"extensions/AntiSpoof/composer.json"
]
}
}
}
参见
- Equivset (provides the equivalence sets used by AntiSpoof)
![]() | 此扩展被用于一个或多个维基媒体项目上。 这可能意味着扩展稳定且工作良好,足以用在同等高流量的网站上。 请在维基媒体的CommonSettings.php和InitialiseSettings.php配置文件中寻找此扩展名称以查看安装它的网站。 详细的已安装扩展的完整列表可在wiki的Special:Version页面找到。 |