Extension talk:AbuseFilter

Jump to navigation Jump to search

About this board

19 previous topics. Previous discussion was archived at Extension talk:AbuseFilter/Archive 1 on 2016-10-24.

How does Abuse Filter block this text?

3
116.192.183.44 (talkcontribs)
[[Cate<noinclude></noinclude>gory:Something unwanted]]

In Abuse Filter parameters, only new_text, new_html variables can be used, there is no variable of Template-Expanded text.

MusikAnimal (talkcontribs)

Try using added_lines_pst or new_pst. These represent pre-save transformed wikitext and should contain things like substitution syntax, and I presume the noinclude tags. I will warn you that the pst variables tend to be rather slow. If you're only looking within category syntax, you might first check added_lines contains "[[Category as this is cheap, then run the more expensive check against pst.

116.192.183.44 (talkcontribs)

Thanks, but how to deal this:

[[Cate{{{|gory}}}:Something unwanted]]
[[Cate{{{anyname|gory}}}:Someth{{{anyname|ing unw}}}anted]]
Reply to "How does Abuse Filter block this text?"

Is there a way to detect the use of spaces to get around filters?

2
Diamond Blizzard (talkcontribs)

I'm asking because I just saw someone adding stuff such as what can be seen in this diff: https://en.wikipedia.org/w/index.php?title=Del_City_High_School&diff=prev&oldid=854268628 Presumably, it was the spaces that prevented the change from being detected, as things such as this: https://en.wikipedia.org/wiki/Special:AbuseLog/21759611 were detected and blocked immediately. I do not feel confident at all in my ability to successfully make any changes myself to filters, so I'm asking this question.

MusikAnimal (talkcontribs)

You can use rmwhitespace() but we'd need to be careful with that filter to make sure no false positives happen as a result. E.g. "ass" matching "as soon" -- though this specific example shouldn't happen.

Reply to "Is there a way to detect the use of spaces to get around filters?"
Summary by PlavorSeol

Problem fixed

PlavorSeol (talkcontribs)

When I go to Special:AbuseFilter after installing AbuseFilter and run update.php, it shows following database error:

[bfb1bf7c329d630ebc5d6e00] 2018-06-25 15:18:44: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

Matěj Suchánek (talkcontribs)
PlavorSeol (talkcontribs)

Database error on Special:AbuseFilter:

[7584d3a6d8cb66b963a8b9a0] /plavormindtest/index.php?title=Special:AbuseFilter Wikimedia\Rdbms\DBQueryError from line 1443 of C:\NGINX\html\plavormindtest\includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT af_id,af_enabled,af_deleted,af_pattern,af_global,af_public_comments,af_hidden,af_hit_count,af_timestamp,af_user_text,af_user,af_actions,af_group,af_throttled FROM abuse_filter WHERE af_deleted = '0' ORDER BY af_id LIMIT 51

Function: IndexPager::buildQueryInfo (AbuseFilterPager)

Error: 1 no such table: abuse_filter

Backtrace:

  1. 0 C:\NGINX\html\plavormindtest\includes\libs\rdbms\database\Database.php(1413): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)
  1. 1 C:\NGINX\html\plavormindtest\includes\libs\rdbms\database\Database.php(1186): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  1. 2 C:\NGINX\html\plavormindtest\includes\libs\rdbms\database\Database.php(1640): Wikimedia\Rdbms\Database->query(string, string)
  1. 3 C:\NGINX\html\plavormindtest\includes\pager\IndexPager.php(368): Wikimedia\Rdbms\Database->select(array, array, array, string, array, array)
  1. 4 C:\NGINX\html\plavormindtest\includes\pager\IndexPager.php(224): IndexPager->reallyDoQuery(string, integer, boolean)
  1. 5 C:\NGINX\html\plavormindtest\includes\pager\IndexPager.php(608): IndexPager->doQuery()
  1. 6 C:\NGINX\html\plavormindtest\includes\pager\TablePager.php(292): IndexPager->isNavigationBarShown()
  1. 7 C:\NGINX\html\plavormindtest\extensions\AbuseFilter\includes\Views\AbuseFilterViewList.php(284): TablePager->getNavigationBar()
  1. 8 C:\NGINX\html\plavormindtest\extensions\AbuseFilter\includes\Views\AbuseFilterViewList.php(134): AbuseFilterViewList->showList(array, array)
  1. 9 C:\NGINX\html\plavormindtest\extensions\AbuseFilter\includes\special\SpecialAbuseFilter.php(122): AbuseFilterViewList->show()
  1. 10 C:\NGINX\html\plavormindtest\includes\specialpage\SpecialPage.php(565): SpecialAbuseFilter->execute(NULL)
  1. 11 C:\NGINX\html\plavormindtest\includes\specialpage\SpecialPageFactory.php(569): SpecialPage->run(NULL)
  1. 12 C:\NGINX\html\plavormindtest\includes\MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
  1. 13 C:\NGINX\html\plavormindtest\includes\MediaWiki.php(867): MediaWiki->performRequest()
  1. 14 C:\NGINX\html\plavormindtest\includes\MediaWiki.php(524): MediaWiki->main()
  1. 15 C:\NGINX\html\plavormindtest\index.php(42): MediaWiki->run()
  1. 16 {main}
PlavorSeol (talkcontribs)

Also update.php shows following error:

Creating abuse_filter table ...[b894800c426189ba94cbe1ab] [no req] Wikimedia\Rdbms\DBQueryError from line 1443 of C:\NGINX\html\plavormindtest\includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: CREATE TABLE abuse_filter (

af_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
af_pattern BLOB NOT NULL,
af_user INTEGER  NOT NULL,
af_user_text BLOB NOT NULL,
af_timestamp BLOB NOT NULL,
af_enabled INTEGER not null default 1,
af_comments BLOB,
af_public_comments BLOB,
af_hidden INTEGER not null default 0,
af_hit_count INTEGER not null default 0,
af_throttled INTEGER NOT NULL default 0,
af_deleted INTEGER NOT NULL DEFAULT 0,
af_actions BLOB NOT NULL DEFAULT ,
af_global INTEGER NOT NULL DEFAULT 0
af_group BLOB  NOT NULL DEFAULT 'default'
)

Function: Wikimedia\Rdbms\Database::sourceFile( C:\NGINX\html\plavormindtest\extensions\AbuseFilter/abusefilter.tables.sqlite.sql ) Error: 1 near "af_group": syntax error

Backtrace:

  1. 0 C:\NGINX\html\plavormindtest\includes\libs\rdbms\database\Database.php(1413): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)
  2. 1 C:\NGINX\html\plavormindtest\includes\libs\rdbms\database\Database.php(1186): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  3. 2 C:\NGINX\html\plavormindtest\includes\libs\rdbms\database\Database.php(4260): Wikimedia\Rdbms\Database->query(string, string)
  4. 3 C:\NGINX\html\plavormindtest\includes\libs\rdbms\database\Database.php(4195): Wikimedia\Rdbms\Database->sourceStream(resource (closed), NULL, NULL, string, NULL)
  5. 4 C:\NGINX\html\plavormindtest\includes\installer\DatabaseUpdater.php(683): Wikimedia\Rdbms\Database->sourceFile(string)
  6. 5 C:\NGINX\html\plavormindtest\includes\installer\DatabaseUpdater.php(726): DatabaseUpdater->applyPatch(string, boolean, string)
  7. 6 C:\NGINX\html\plavormindtest\includes\installer\DatabaseUpdater.php(482): DatabaseUpdater->addTable(string, string, boolean)
  8. 7 C:\NGINX\html\plavormindtest\includes\installer\DatabaseUpdater.php(450): DatabaseUpdater->runUpdates(array, boolean)
  9. 8 C:\NGINX\html\plavormindtest\maintenance\update.php(200): DatabaseUpdater->doUpdates(array)
  10. 9 C:\NGINX\html\plavormindtest\maintenance\doMaintenance.php(94): UpdateMediaWiki->execute()
  11. 10 C:\NGINX\html\plavormindtest\maintenance\update.php(245): require_once(string)
  12. 11 {main}
Matěj Suchánek (talkcontribs)

Try downloading the newest version now. It seems Daimona Eaytoy fixed some syntax errors related to sqlite after your report.

Daimona Eaytoy (talkcontribs)

Yeah, I noticed it independently. BTW, @PlavorSeol, I suggest you to report these bugs on phabricator, so that they won't probably get unnoticed.

PlavorSeol (talkcontribs)

@Daimona Eaytoy Thanks, it works now. At first, I thought I configured my wiki incorrectly so that it had a problem.

Los Vegas (talkcontribs)

What i set block duration?

Matěj Suchánek (talkcontribs)

$wgAbuseFilterBlockDuration for all filters. Setting for individual filters is not possible.

Question regarding the abuse filter

1
UpsandDowns1234 (talkcontribs)

What is the difference between "block" and "block autopromote"?

Insure the stability of the filter decisions?

1
Rical (talkcontribs)

The limit of actions number is $wgAbuseFilterProfileActionsCap = 10 000. Is there a way to insure the stability of the filter decisions? Example: a ponderation of 0.0001 for each new case.

wgAbuseFilterNotificationsPrivate

3
Nirmos (talkcontribs)

Could "Enable notifications for private filters" be elaborated on? Is the reader to assume that "notifications" means Echo here? If that's the case, it might make sense to link to Notifications, for example.

Matěj Suchánek (talkcontribs)

Refers to "notifications" in $wgAbuseFilterNotifications in the row above.

Nirmos (talkcontribs)

Ah, I completely missed that. I feel stupid now. Still, that description is not super clear to mortal people like me. If I understand the description correctly, $wgAbuseFilterNotifications is whether to show log events for hits (like EventStreams does), but neither "log" or "event" is mentioned. But I rest my case :D Thanks!

Seewolf (talkcontribs)

I have created a filter to slow down high frequency troll account creation via proxy: [[:de:Spezial:Missbrauchsfilter/250|]]. action = createaccount, 1 action per 60 seconds. My problem is that a failed try because of a misspelled captcha also counts as one action, so a newbie who gets the captcha wrong has no chance to create an account.

Is this intended or could it be solved?

Alex Mashin (talkcontribs)
Reply to "createaccount and captcha"

MWException on new filter: no submit callback provided.

1
Tomasu (talkcontribs)

When I try to add a new filter I get the following error:

using media wiki 1.28

[WbmWUmuq6O4AAAPiRikAAAAE] /index.php?title=Special:AbuseFilter/new MWException from line 650 of /home/mediawiki/public_html/includes/htmlform/HTMLForm.php: HTMLForm: no submit callback provided. Use setSubmitCallback() to set one.

Backtrace:

#0 /home/mediawiki/public_html/includes/htmlform/HTMLForm.php(553): HTMLForm->trySubmit()

#1 /home/mediawiki/public_html/includes/htmlform/HTMLForm.php(568): HTMLForm->tryAuthorizedSubmit()

#2 /home/mediawiki/public_html/extensions/AbuseFilter/Views/AbuseFilterViewImport.php(22): HTMLForm->show()

#3 /home/mediawiki/public_html/extensions/AbuseFilter/special/SpecialAbuseFilter.php(115): AbuseFilterViewImport->show()

#4 /home/mediawiki/public_html/includes/specialpage/SpecialPage.php(522): SpecialAbuseFilter->execute(string)

#5 /home/mediawiki/public_html/includes/specialpage/SpecialPageFactory.php(576): SpecialPage->run(string)

#6 /home/mediawiki/public_html/includes/MediaWiki.php(283): SpecialPageFactory::executePath(Title, RequestContext)

#7 /home/mediawiki/public_html/includes/MediaWiki.php(851): MediaWiki->performRequest()

#8 /home/mediawiki/public_html/includes/MediaWiki.php(512): MediaWiki->main()

#9 /home/mediawiki/public_html/index.php(43): MediaWiki->run()

#10 {main}

Reply to "MWException on new filter: no submit callback provided."

You don't have permission to access /wiki/Special:AbuseFilter/new on this server after three imports

4
Summary by IlseMul

Ciencia Al Poder Gave me the solution: It was the ModSecurity that was blocking the implementation of the abusefilter I wanted. Thanks again!

IlseMul (talkcontribs)

I've succesfully imported three filters from wikipedia and when I tried to import the fourth one, I get this message. I don't understand why this is happening all of a sudden. I am logged in, I am the sysop and I'm not on SSL.

The same happens when I try to create a new filter. I can click the link, fill out the details and when I try to save it, I can the above message.

How can I solve this?

Forbidden

You don't have permission to access /wiki/Special:AbuseFilter/new on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Ciencia Al Poder (talkcontribs)

You're probably hitting a spam filter or other filter that prevents submitting content with special words/characters. This is configured on the server, MediaWiki doesn't handle this error, often caused by ModSecurity. Contact your host about this.

IlseMul (talkcontribs)

It was indeed the ModSecurity. The host has whitelisted the rule there, so that I could the abusefilter rule :)

Thanks for the help!

This post was hidden by AhmadF.Cheema (history)