Extension:AntiSpoof
Release status: stableCategory:Stable extensions |
|
|---|---|
| Implementation | User activityCategory:User activity extensions |
| Description | Prevents the creation of confusable usernames. |
| Author(s) | Brooke Vibbertalk |
| Compatibility policy | Snapshots releases along with MediaWiki. Master is not backward compatible.Category:Extensions with release branches compatibility policy |
| Database changes | Yes |
| Composer | mediawiki/anti-spoof |
|
|
|
|
| Licence | GNU General Public License 2.0 or later |
| Download | Category:Extensions in Wikimedia version control |
| Translate the AntiSpoof extension if it is available at translatewiki.net | |
| Issues | Open tasks · Report a bug |
The AntiSpoof extension prevents registering confusable usernames that are otherwise easily mistaken, or circumvent block patterns, or impersonate existing accounts. It also blocks creating accounts with mixed-script usernames.
For example, if user John Doe is already registered, the extension will block attempts to register:
- JoHn dOE ( capital letters in different places)
- 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
- Download and move the extracted
AntiSpooffolder to yourextensions/directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof
- Only when installing from Git, run Composer to install PHP dependencies, by issuing
composer install --no-devin the extension directory. (See T173141 for potential complications.)Category:Extensions requiring Composer with git - Add the following code at the bottom of your LocalSettings.php file:
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';
- If you see an error about 'spoofuser' table missing, you can try running from mediawiki root folder
php maintenance/run.php update.php
- Run the
batchAntiSpoof.phpscript from the command line to pre-populate thespoofusertable with your wiki's existing usernames.
php maintenance/run.php AntiSpoof:batchAntiSpoof.php
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully 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".
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"
]
}
}
}
See also
- Equivset (provides the equivalence sets used by AntiSpoof)
| This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |
| This extension is included in the following wiki farms/hosts and/or packages: |
