Extension talk:SpamBlacklist/From MediaWiki

Conflicting with ConfirmEdit Extension
Hi, it seems this extension is conflicting with the ConfirmEdit Extension (link). On creation of a new page (where a captcha is thrown) i get the following error:

Warning: Missing argument 4 for wfspamblacklistvalidate in /home/www/web125/html/rockinchina/wiki/extensions/SpamBlackList/SpamBlacklist.php on line 67


 * MediaWiki: 1.6.8, PHP: 4.4.6

Cross posting to: Extension_talk:ConfirmEdit -- Matsch 20:06, 23 August 2007 (UTC)


 * I too am seeing precisely the same error, but we don't have the ConfirmEdit extension installed.
 * MediaWiki: 1.6.9, PHP: 4.3.10-22 209.198.95.98 18:07, 27 August 2007 (UTC)

In order to correct the problem on my wiki, I did the following edit in the SpamBlackList.php file:

# removing the last two arguments to try and fix error problem # function wfSpamBlacklistFilter( &$title, $text, $section, &$hookErr, $editSummary ) { function wfSpamBlacklistFilter( &$title, $text, $section ) {

That fixed the problem for me. Allan Newsome 71.228.186.123 21:39, 19 March 2011 (UTC)

Chinese Spam
I've found that [www.fanhistory.com/index.php/MediaWiki:Spam-blacklist adding .cn] means fewer spam postings from Chinese wikispammers happen. Any other ways to minimize the Chinese based spam with Chinese characters other than trying add those character strings? And does the blocking work for them or is MediaWiki reading them as not the right way in order to block them right? --76.214.233.199 14:59, 2 September 2007 (UTC)


 * sorry, i had to unlink your link because of spam protection. -- seth 23:36, 19 April 2008 (UTC)

Line Error Message
So I load the pages into my extension directory and at the top of my wiki is spits out Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]. If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/.lutece/mariainc/disapedia.com/extensions/SpamBlacklist/SpamBlacklist.php on line 103

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]. If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/.lutece/mariainc/disapedia.com/extensions/SpamBlacklist/SpamBlacklist.php on line 112

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]. If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/.lutece/mariainc/disapedia.com/extensions/SpamBlacklist/SpamBlacklist.php on line 112 How did I screw up? 24.5.195.51 23:14, 23 November 2007 (UTC)
 * I had the same problem running Mediawiki 1.10.1 until I installed using the 1.10 branch. --Tosfos 04:17, 31 December 2007 (UTC)

Losing content
I'm wondering if anybody knows how to customize this extension so that you don't lose all your edits if you unknowingly put a link that is on the spam list. Right now it simply spits you out to the main page. It would be great if this extension simply reloaded the editing page (with all the edits) and put the warning message at the top of the editing page. Similar to the ConfirmEdit extension. Is this possible? Edward (March 28, 2008)

more detailed manual and suggestions
hi!

is there a more detailed description than Extension:SpamBlacklist? i have some questions/suggestions/feature requests: for the s-modifier is not used, it wouldn't be necessary to avoid patterns like ".*" as it is said in the manual. ".*" would only match until EOL.
 * 1) where does the regexp try to match? afaics (i googled for "function getExternalLinks") there is done a preparsing which greps all external urls and separates them by "\n".
 * 1) does (?:foo|bar) vs. (foo|bar) affect speed, when S-modifier ist set? (without the S-modifier i guess that a non-capturing pattern would be faster).
 * 2) why does the header of those blacklists say "Every non-blank line is a regex fragment which will only match hosts inside URLs", while that isn't true? it does not only match hosts, it matches the path, too.
 * 3) actually the code   in manual is not right, cause "!" is not the delimiter character. so escaping like \! wouldn't be necessary to match a "!".
 * 4) wouldn't it be better and faster to use just   instead of  ?
 * 5) as there exists a log-file for all changes on the spamblacklist like meta:Spam_blacklist/Log it would be a nice feature, if MediaWiki:Spamprotectiontext would mention the reason noted in that log-file. is that possible?
 * See 4459 Mike.lifeguard 00:42, 21 May 2008 (UTC)
 * Actually this is fixed now, as I wrote there (4459). -- seth 19:13, 19 February 2009 (UTC)
 * That is not fixed. &mdash; Mike.lifeguard &#124; @meta 00:09, 20 February 2009 (UTC)
 * 1) the blacklist-users should have the opportunity to chose whether a regexp should be blocked on articles only or on arcticles _and_ their talk-pages. this could be done for example by a special parameter or a separated blacklist.
 * 2) a new entry in a blacklist should not cause a spamprotection intervention on existing links, but only when someone tries to put a new (forbidden) link to a page. (i guess, this could be technically solved by simply counting the numbers of occurrences of forbidden urls before and after editing of a page: if diff!=0 then block)
 * Done by 1505 in 34769 Mike.lifeguard 00:42, 21 May 2008 (UTC)

especially the realization of the last two feature requests would be a very helpful advantage.

-- seth 22:48, 17 April 2008 (UTC), 23:36, 19 April 2008 (UTC), 22:44, 1 May 2008 (UTC), 23:41, 12 July 2008 (UTC)

see also: 14089, 4459, 14091 , 14092. -- seth 09:40, 12 May 2008 (UTC)


 * however, i just updated the manual, so some of my requests are completed. -- seth 20:34, 12 May 2008 (UTC)

See SpamBlacklist requests on Bugzilla. &mdash; Mike.lifeguard &#124; @meta 00:12, 20 February 2009 (UTC)

Warnings for wfSpamBlacklistFilter
I'm getting the following warning messages when trying to save a spam address in an article:

Warning: Missing argument 4 for wfSpamBlacklistFilter, called in /home/zzzzzzz4/public_html/wiki/includes/EditPage.php on line 651 and defined in /home/zzzzzzz4/public_html/wiki/extensions/SpamBlacklist/SpamBlacklist.php on line 75

Warning: Missing argument 5 for wfSpamBlacklistFilter, called in /home/zzzzzzz4/public_html/wiki/includes/EditPage.php on line 651 and defined in /home/zzzzzzz4/public_html/wiki/extensions/SpamBlacklist/SpamBlacklist.php on line 75


 * MediaWiki: 1.11.0, PHP: 5.2.6

I have no idea what is the problem. Please help! --Nathanael Bar-Aur L. 00:26, 24 August 2008 (UTC)


 * I don't get why the hook function for $wgFilterCallback, wfSpamBlacklistFilter declares 5 parameters when the manual clearly states that the function is supposed to be getting only 3? Am I missing something? Apparently this June 19 edit is responsible If I undo these changes the warning messages go away, but I don't know if it will mess up something else. Please someone check it out. --Nathanael Bar-Aur L. 02:13, 24 August 2008 (UTC)


 * I have this same problem! --74.67.44.255 02:32, 17 September 2008 (UTC)
 * Same problem here, with just a barebones 1.6 MediaWiki installation and this as the only additional extension. What gives? :-(

I'd recommend updating. I'm using r45914 with no issues. &mdash; Mike.lifeguard &#124; @meta 21:25, 27 January 2009 (UTC)

www required
I downloaded SpamBlacklist extension today.
 * http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SpamBlacklist/

I used the domain badspammer\.com for a test case:
 * http://www.gustavwiki.com/wiki/MediaWiki:Spam-blacklist

The spam filter works for http://www.badspammer.com/ but does not work for http://badspammer.com/

Is there a patch to fix this?


 * --jwalling 06:31, 2 September 2008 (UTC)

- Update 1:
 * The problem cleared itself without my intervention. Go figure!
 * --jwalling 07:24, 2 September 2008 (UTC)

Update 2:
 * The block of http://badspammer.com/ is erratic
 * Block works here: http://www.gustavwiki.com/wiki/Talk:Spam_Patrol
 * But not here: http://www.gustavwiki.com/wiki/Spam_Patrol#SpamBlacklist_Extension
 * --jwalling 07:43, 2 September 2008 (UTC)

Warnings for wfSpamBlacklistFilterMerged
PHP Warning: Missing argument 4 for wfSpamBlacklistFilterMerged in PATH/SpamBlacklist/SpamBlacklist.php on line 84 PHP Notice: Undefined variable: editSummary in PATH/SpamBlacklist/SpamBlacklist.php on line 94

No Spam Protection. Occurs regardless of local stored or online source list. System: MediaWiki 1.12.0, PHP 5.2.0-8+etch13 (cgi-fcgi), --Martin

"Hook wfSpamBlacklistFilterMerged failed to return a value; should return true to continue hook processing or false to abort."

I've installed with this default settings. Why am I getting this?

Conflict with EditPage.php
Hi, perhaps someone can help me? I get this following error message:

Missing Warning: Missing argument 4 for wfSpamBlacklistFilter, called in /includes/EditPage.php on line 651 and defined in /extensions/SpamBlacklist/SpamBlacklist.php on line 74

Missing Warning: Missing argument 4 for wfSpamBlacklistFilter, called in /includes/EditPage.php on line 651 and defined in /extensions/SpamBlacklist/SpamBlacklist.php on line 74

EditPage.php, line 651 contains following code: }		if ( $wgFilterCallback && $wgFilterCallback( $this->mTitle, $this->textbox1, $this->section ) ) { # Error messages or other handling should be performed by the filter function wfProfileOut( $fname ); wfProfileOut( "$fname-checks" ); return false;

SpamBlacklist.php, line 74 contains following code: /** * Hook function for $wgFilterCallback */ '''function wfSpamBlacklistFilter( &$title, $text, $section, &$hookErr, $editSummary ) { $spamObj = wfSpamBlacklistObject; $ret = $spamObj->filter( $title, $text, $section, $editSummary ); if ( $ret !== false ) EditPage::spamPage( $ret ); return ( $ret !== false );

The bold typed lines in the code are the lines which are mentioned in the eror message. Since I'm not specialized in PHP-Programming, I have no idea what hat to be changed in the code, so that it works correctly. The spamfilter function itself works, but I wan't to get rid of the error message and the included information to my server paths.

Thanks, Hajosch —The preceding unsigned comment was added by 85.179.136.31 (talk • contribs) 10:06, 18 November 2008 (UTC). Please sign your posts with ~ !


 * I am getting similar problems when I edit a page and do not provide a summary for the change, the edit pages comes back warning me about this with the error mention below at the top of the page. If I do provide a summary, it change is committed and I see no error. I downloaded the latest revision but I am still seeing this error:
 * Missing argument 4 for wfSpamBlacklistFilterMerged in < >/public_html/wiki/extensions/SpamBlacklist/SpamBlacklist.php on line 83
 * SkyLined - 74.125.121.49 11:15, 6 March 2009 (UTC)

Not working for me also
I have also tried all options, can any one help me out...URGENT... Suyash Jin

White List of Regular Expressions
The RTEMS Project has a Mediawiki installation (http://wiki.rtems.org) and use this extension with no real problems. We have a user whose last name is "Sporner" which matches *porn*. He created an account with an umlaut for the "o" to get by the "porn" filter. But now any time someone attempts to reference him by his name without the umlaut, that edit is rejected. I see a white list for URLs. Is there a similar capability for a white list regex so "Sporner" will be ok?

Alternatively, can someone suggest a modification to the regex which would let us use his name in an edit. :)

Thanks.

--JoelSherrill 14:58, 11 June 2009 (UTC)
 * This blocks external links and nothing else, so I don't really know what you're talking about. &mdash; Mike.lifeguard &#124; @meta 23:32, 28 June 2009 (UTC)

MediaWiki:Spam-blacklist or MediaWiki:Spamblacklist?
Is that hyphen correct? At least on Wikitravel (MW 1.11.2), the form MediaWiki:Spamblacklist is necessary. Jpatokal 08:16, 22 June 2009 (UTC)


 * The hyphen is correct. Wikitravel doesn't even have this extension installed, so I'm not sure what you're talking about. —Emufarmers(T 02:08, 23 June 2009 (UTC)

Which version does this actually work with?
"The extension might work with MediaWiki version 1.6.0 or greater." is unhelpfully vague. I was getting the above "Missing argument 4 for wfSpamBlacklistFilterMerged" error until I upgraded my MediaWiki install to 1.15.0 - I didn't note down the version number of my previous install, but it was certainly above 1.6.0 (I think it was around 1.8.0, I hadn't updated that particular wiki for a while). --Kevan 18:12, 6 July 2009 (UTC)

Whitelist admin actions
I'm an admin at wikimedia commons & we sometimes have the case that images are sourced from urls which are blacklisted. This makes it hard or impossible to add a proper source link & we have to resort to putting spaces in the url etc. Thus my request: Could the blacklist maybe be overidden by admins? I don't think we have to fear admins mass spamming their project ;)--Diebuche 11:02, 2 July 2010 (UTC)

Problem with gallery
so after running the cleanup.php script, all the galleries in the cleaned pages do not work any more. when i edit any of the pages, do not make any change at all and then save, it solves the problem for this page. when cleaning large number of pages this is very bad - still better than having to do it manually, but not by much...

it seems that there is some missing operation or parameter when calling updateArticle.

the problem is that after the cleanup.php script is run, the photos in the gallery of the cleaned pages point to: instead of IOW, the photos in the gallery lose the "?title=" part.
 * URL/index.php/File:Filename
 * URL/index.php?title=File:Filename

if i open the page for edit and save, no change shows in the page history for my save, but the problem is fixed. . קיפודנחש 18:01, 10 October 2010 (UTC)

Found Out Why It Sometimes Doesn't Work
I was having the same problem others were (just wouldn't load). I found that the problem was the name of the blacklist extension directory. I re nameded it and found out that i put a space at the end of the name and, with the space removed, It works like a charm. If you get an error with an extension such as: "No such file or directory in.../LocalSettings.php". empty spaces apear to be saved as part of a folder/file name. Make sure there aren't any extra spaces at the end of your extension's folder name.

Expected Memory Use
I found one day that I had to up php.ini to 64M to have the spam black list not exhaust memory - this is using the default black and white lists. What is the expected memory footprint?

Errors running cleanup.php
When trying to run cleanup.php I constantly get tese errors, and haven't been able yet to resolve them:

PHP Notice: Undefined variable: wgSpamBlacklistSettings in /var/www/ /extensions/SpamBlacklist/cleanup.php on line 77 PHP Warning: Invalid argument supplied for foreach in /var/www/ /SpamBlacklist_body.php on line 17 PHP Fatal error: Call to undefined method SpamBlacklist::getBlacklists in /var/www/ /extensions/SpamBlacklist/cleanup.php on line 81

Does anyone have advice on how to get past this? --Automagic 15:48, 12 May 2011 (UTC)
 * what is cleanup.php anyway? Errectstapler 13:55, 9 July 2011 (UTC)

Only works on domain names?
So I've tried to edit my local MediaWiki:Spam-blacklist file. It seems it only blocks things if it's in the domain name, not anything that follows, despite the examples on the main page of this talk file. For example, www.badspammer.com is blocked, but not www.example.com/badspammer.html is not. Any way to fix this or is the extension just not as useful as I thought?

Hook wfSpamBlacklistFilterMerged failed to return a value
Detected bug in an extension! Hook wfSpamBlacklistFilterMerged failed to return a value; should return true to continue hook processing or false to abort.

Backtrace:


 * 1) 0 /customers/deadhorseinterchange.com/deadhorseinterchange.com/httpd.www/wiki/includes/EditPage.php(956): wfRunHooks('EditFilterMerge...', Array)
 * 2) 1 /customers/deadhorseinterchange.com/deadhorseinterchange.com/httpd.www/wiki/includes/EditPage.php(2483): EditPage->internalAttemptSave(false, false)
 * 3) 2 /customers/deadhorseinterchange.com/deadhorseinterchange.com/httpd.www/wiki/includes/EditPage.php(449): EditPage->attemptSave
 * 4) 3 /customers/deadhorseinterchange.com/deadhorseinterchange.com/httpd.www/wiki/includes/EditPage.php(340): EditPage->edit
 * 5) 4 /customers/deadhorseinterchange.com/deadhorseinterchange.com/httpd.www/wiki/includes/Wiki.php(510): EditPage->submit
 * 6) 5 /customers/deadhorseinterchange.com/deadhorseinterchange.com/httpd.www/wiki/includes/Wiki.php(63): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
 * 7) 6 /customers/deadhorseinterchange.com/deadhorseinterchange.com/httpd.www/wiki/index.php(116): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
 * 8) 7 {main}

What the hell does this mean and how do I fix it? I'm sick of all these problems, the SpamBlacklist does this, the ReCaptcha keeps asking for keys even though it has them, and SimpleAntiSpam simply doesn't work.


 * What version of the extension are you using? —Emufarmers(T 08:37, 28 May 2011 (UTC)


 * Version 1.15.X, corresponding with the version of my wiki. 86.18.165.200 15:39, 28 May 2011 (UTC)


 * I have the very same issue. I'm using version MW1.15-r48184. 70.53.2.75 16:19, 4 June 2011 (UTC)


 * Update: The most recent version (trunk-r88992) clears up this issue and works just fine with MediaWiki 1.15.x. 70.53.2.75 13:51, 5 June 2011 (UTC)

How Do I Make a List?
I plan on setting one up on a wiki I'm an admin on (part of Wikia), but I'm terrible at putting the list together. Can someone copy/paste the full text of the format with lines that say "Word 1," "Word 2," etc? Thanks in advance.

---****--- Roads 15:35, 1 August 2011 (UTC)