Extension:AntiSpoof

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
AntiSpoof

Release status: stable

Implementation User activity
Description Prevents the creation of confusable usernames.
Author(s) Brion Vibber (Brion VIBBERtalk)
MediaWiki 1.13+
Database changes yes
License GPL v2 or later
Download
CHANGELOG
Parameters

$wgAntiSpoofAccounts

Added rights

override-antispoof

Hooks used
LoadExtensionSchemaUpdates

AbortNewAccount
AddNewAccount
UserCreateForm
RenameUserComplete

Bugs: list open list all report

The AntiSpoof extension is an extension for preventing confusable usernames from being created. It blocks the creation of accounts with mixed-script, confusing and similar usernames.

For example, if user John Doe is already registered, the extension will block attempts to register:

  • Jοhn Doe ("ο" in Jοhn is Greek small letter omicron),
  • John Dоe ("о" in Dоe is Cyrillic small letter 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),

etc.

[edit] Download

You can download the extension directly from the MediaWiki source code repository (browse code). You can get:

After you've got the code, save it into the extensions/AntiSpoof directory of your wiki.

If you are familiar with git and have shell access to your server, you can obtain the extension, with all its tags and branches, as follows:

cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AntiSpoof.git

The last change to the extension was:

Localisation updates from http://translatewiki.net.
Localisation updates from http://translatewiki.net.
— Sun, 27 Jan 2013 18:52:50 +0000


[edit] Installation

  1. Create a directory AntiSpoof in your $IP/extensions directory.
  2. Extract the files to this $IP/extensions/AntiSpoof directory.
  3. Add
    require_once( "$IP/extensions/AntiSpoof/AntiSpoof.php" );
    to the bottom of LocalSettings.php.
  4. In case user accounts are stored in a shared database, add
    $wgSharedTables[] = 'spoofuser';
    just after that line.
  5. Add the required tables to the database; on the command line, enter:
    php maintenance/update.php
    (Note: Your designated database user needs to have CREATE rights on your MediaWiki database.)
  6. Run the batchAntiSpoof.php script from the command line to pre-populate the antispoof table with your wiki's existing usernames. Enter:
    php extensions/AntiSpoof/maintenance/batchAntiSpoof.php
  7. The Special:Version of your wiki should show the extension is installed. 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'.

[edit] See also


Language: English  • 日本語 • русский