Extension:AntiSpoof

From MediaWiki.org
Jump to: navigation, search

Other languages:
English • ‎italiano • ‎日本語 • ‎한국어 • ‎polski • ‎русский • ‎中文
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
AntiSpoof

Release status:Extension status stable

ImplementationTemplate:Extension#type User activity
DescriptionTemplate:Extension#description Prevents the creation of confusable usernames.
Author(s)Template:Extension#username Brion Vibber (Brion VIBBERtalk)
MediaWikiTemplate:Extension#mediawiki 1.25+
Database changesTemplate:Extension#needs-updatephp Yes
TablesTemplate:Extension#table1 spoofuserExtension:AntiSpoof/spoofuser table
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
ParametersTemplate:Extension#parameters
  • $wgAntiSpoofAccounts
  • $wgAntiSpoofBlacklist
Added rightsTemplate:Extension#rights

override-antispoof

Hooks usedTemplate:Extension#hook
LoadExtensionSchemaUpdatesManual:Hooks/LoadExtensionSchemaUpdates
RenameUserCompleteManual:Hooks/RenameUserComplete
DeleteAccount

Translate the AntiSpoof extension if it is available at translatewiki.net

Check usage and version matrix.

IssuesPhabricator

Open tasks · Report a bug

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)
  • J0hn Doe ("0" is the number zero)

etc.

Installation[edit]

  • Download and place the file(s) in a directory called AntiSpoof in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'AntiSpoof' );
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • In case user accounts are stored in a shared database, add:
$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
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'AntiSpoof' );, you need to use:

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

See also[edit]