Extension talk:AntiSpoof

From mediawiki.org
Jump to navigation Jump to search

How do you use it?[edit]

I guess the point is to prevent someone from creating a user account name that looks similar to an existing one by mapping similar looking characters. Sounds good. But where are the installation instructions? How do you use this? Where are the files to download? Do I just copy and paste the text somewhere? As-is, this seems totally unusable, yet it's installed on several of the WMF sites, so it seems like a good thing to have. Somebody who understands this thing should add at least some rudimentary docs. Thanks! --Willscrlt 03:34, 25 August 2007 (UTC)

I second this motion, a good 3 years later. Asndb 04:36, 15 September 2010 (UTC)

One more year after... I see installation instructions, but the purpose of the extension is still unclear. What is "confusing usernames"? This text at the end of "Install" section:

Note: equivset.ser is set to null Username "Exampla" will be created and regardless if username "Example" is in the database. However, Login error: "??=?" (special characters ) is not allowed to prevent confusing or spoofed usernames: Contains unassigned or deprecated character. Please choose another name.

explains me nothing. Looks like somebody was interrupted in the middle of writing documentation and never get back. I would like to have some explanation with a few examples.

Van de Bugger 08:57, 27 September 2011 (UTC)

P. S.

The description from the extension code is much more understandable: "Blocks the creation of accounts with mixed-script, confusing and similar usernames", but anyway, description on the extension page is still desired.


require_once("$IP/extensions/AntiSpoof/AntiSpoof.php"); #confusable usernames

  • error:
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function "SpoofUser::getConflict". MySQL returned error "1146: Table 'wikidb.spoofuser' doesn't exist (localhost)".

Retrieved from "http://zooworlds.org/index.php/Special:UserLogin" — Preceding unsigned comment added by (talkcontribs)

It looks to me like you haven't followed the installation instructions. Have you run update.php, or, the SQL query listed on the page? SQLQuery me! 09:00, 24 June 2008 (UTC)
The SQL query listed on the page has been removed. Must everybody who wants to use this (or Extension:AbuseFilter, which requres this) on a MediaWiki site on a shared host eat the cost of switching to a different web host? --Damian Yerrick (talk) 13:31, 24 March 2012 (UTC)
Some shared hosts provide SSH access as well. With some hosts it can be enabled on a request. --Amakuha (talk) 12:07, 23 July 2013 (UTC)

ImageMap dependency?[edit]

Why is there a dependency on Extension:ImageMap identified for this extension? --Obliquemotion 19:09, 2 June 2010 (UTC)

Unable to free MySQL result[edit]

While installing AntiSpoof r105224 on MW1.18.0 I've received this message (read heading) after running php extensions/AntiSpoof/batchAntiSpoof.php. Looks like everything works well, but reading this message after the command reads the database worries me a bit. Should I be worried about it? Is there a reason for this to appear? 22:22, 6 December 2011 (UTC)

Same here, tried running the batch with and without the shared user database line in LocalSettings, I get this warning either way. Going with it and hoping it's alright, anti-spoof is working regardless. Running MW 1.16-- 18:55, 13 January 2012 (UTC)

I'm getting this same problem with $dbw->freeResult( $result ); on MW 1.17. --Hypergrove (talk) 01:47, 29 August 2012 (UTC)

Error when running update.php[edit]

So I get this error

Creating spoofuser table...A database query syntax error has occurred.
The last attempted database query was:
"CREATE TABLE `spoofuser` (
su_name VARCHAR(255),
su_normalized VARCHAR(255),
su_legal BOOL,
su_error TEXT,
PRIMARY KEY (su_name),
KEY(su_normalized, su_name)
from within function "DatabaseBase::sourceFile( /$/w/extensions/AntiSpoof/sql/patch-antispoof.mysql.sql )".
Database returned error "1071: Specified key was too long; max key length is 1000 bytes (localhost)"

Really don't know why, apparently I can't have more than a 1000 byte key, so how do i fix this?

Actually I worked it out, edit patch-antispoof.mysql.sql to have each character be 166 and 167 instead of 255 and 255.

Fatal error during installation[edit]

I made it through most of the installation steps, but I got hung up once I ran the batchAntiSpoof.php script. I got this error:

Fatal error: Class 'SpoofUser' not found in /home/*****/public_html/wikific/extensions/AntiSpoof/maintenance/BatchAntiSpoofClass.php on line 40

Anybody know what I can do to remedy this? The line in question doesn't seem to have anything wrong with it (that I can tell, anyway; I'm just a layman). I haven't touched any of the files included with AntiSpoof; I've only edited LocalSettings.php to include the extension.

--Azurite (talk) 03:25, 14 May 2012 (UTC)

It looks like this line is missing in your LocalSettings.php: require_once( "$IP/extensions/AntiSpoof/AntiSpoof.php" ); Yannouk (talk) 15:35, 28 May 2012 (UTC)

[wikicod@server AntiSpoof]$ cd maintenance/ [wikicod@server maintenance]$ ls BatchAntiSpoofClass.php batchAntiSpoof.php [wikicod@server maintenance]$ php batchAntiSpoof.php Creating username spoofs... ...5 [29129c6aca428a6ddd655bdc] [no req] Wikimedia\Rdbms\DBQueryError from line 158 7 of /home/wikicod/domains/wikicod.ir/public_html/w/includes/libs/rdbms/database /Database.php: A database query error has occurred. Did you forget to run your a pplication's database schema updater after upgrading? Query: REPLACE INTO `wikicod_spoofuser` (su_name,su_normalized,su_legal,su_error ) VALUES ('Admin','v2:ADMIN','1',NULL),('Mahdi','v2:MAHDI','1',NULL),('Test','v2 :TEST','1',NULL),('Flow talk page manager','v2:FLOWTALKPAGEMANAGER','1',NULL),(' Esfandiari','v2:ESFANDIARI','1',NULL) Function: SpoofUser::batchRecord Error: 1146 Table 'wikicod_coddb.wikicod_spoofuser' doesn't exist (localhost)


  1. 0 /home/wikicod/domains/wikicod.ir/public_html/w/includes/libs/rdbms/database/D atabase.php(1556): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, int eger, string, string)
  2. 1 /home/wikicod/domains/wikicod.ir/public_html/w/includes/libs/rdbms/database/D atabase.php(1274): Wikimedia\Rdbms\Database->reportQueryError(string, integer, s tring, string, boolean)
  3. 2 /home/wikicod/domains/wikicod.ir/public_html/w/includes/libs/rdbms/database/D atabase.php(2927): Wikimedia\Rdbms\Database->query(string, string)
  4. 3 /home/wikicod/domains/wikicod.ir/public_html/w/includes/libs/rdbms/database/D atabaseMysqlBase.php(528): Wikimedia\Rdbms\Database->nativeReplace(string, array , string)
  5. 4 /home/wikicod/domains/wikicod.ir/public_html/w/extensions/AntiSpoof/includes/ SpoofUser.php(168): Wikimedia\Rdbms\DatabaseMysqlBase->replace(string, array, ar ray, string)
  6. 5 /home/wikicod/domains/wikicod.ir/public_html/w/extensions/AntiSpoof/maintenan ce/BatchAntiSpoofClass.php(41): SpoofUser::batchRecord(Wikimedia\Rdbms\DatabaseM ysqli, array)
  7. 6 /home/wikicod/domains/wikicod.ir/public_html/w/extensions/AntiSpoof/maintenan ce/BatchAntiSpoofClass.php(100): BatchAntiSpoof->batchRecord(array)
  8. 7 /home/wikicod/domains/wikicod.ir/public_html/w/maintenance/doMaintenance.php( 96): BatchAntiSpoof->execute()
  9. 8 /home/wikicod/domains/wikicod.ir/public_html/w/extensions/AntiSpoof/maintenan ce/batchAntiSpoof.php(22): require_once(string)
  10. 9 {main}--Sokote zaman (talk) 15:17, 15 September 2019 (UTC)

Update.php is lacking[edit]

Hi, my name is Nicolas I created www.wiki-theory.com...

Just to say that trying to install AntiSpoof with the command git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git It seems that the update.php file needed to create the database is lacking.

Thanks if you can do something.

best regards-- 16:40, 12 September 2012 (UTC)

Sorry for my mistake, i didn't understand that update.php is in the maintenance folder of the main folder mediawiki and thought that it is in AntiSpoof/maintenance folder.

-- 16:44, 12 September 2012 (UTC)

Git master branch requires PHP 5.3[edit]

If you're not running PHP 5.3+, note the following bug report before installing:


__DIR__ was added in PHP 5.3.0.

--Wmat (talk) 14:17, 2 November 2012 (UTC)

Adm1n user[edit]

Hello! I installed the extension successfully, but it let me register a user "Adm1n". Is this normal now or does my extension work improperly? It didn't let me create a user "Admіn" though (Cyrillic "і"). --Amakuha (talk) 12:14, 23 July 2013 (UTC)