Page MenuHomePhabricator

Throttling doesn't work without object caching
Open, MediumPublic

Description

Author: kazink

Description:
A simple filter:
length(added_links) > 0
works fine.

But if I try to add throttling, it stops working at all. I tried with the options:
Number of actions to allow: 2
Period of time: 3600 seconds
Group throttle by: user
Action: Block the user and/or IP from editing.

Then I tried adding links several times to a single one and different articles by the same (registered) user, but the user has not been blocked. Also tried different actions, like Tag the edit for further review, and Trigger these actions after giving the user a warning. Nothing works, the warning is not been shown too. And the hit count on the filter stays at 0.


Version: master
Severity: major
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=20487

Details

Reference
bz50894

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:54 AM
bzimport added a project: AbuseFilter.
bzimport set Reference to bz50894.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Jul 7 2013, 7:18 PM

Thanks for taking the time to report this!

Which versions of MediaWiki and which version of AbuseFilter is this about?
Also see http://www.mediawiki.org/wiki/Manual:How_to_debug

kazink wrote:

Which versions of MediaWiki and which version of AbuseFilter is this about?

Sorry, forgot to add this: MW 1.21, AbuseFilter master.

I will try to debug when I have some time.

kazink wrote:

I found out that the internal count of filter hits read from Memcached is always 0. I don't have Memcached enabled.

isThrottled function (AbuseFilter.class.php)
$key = 'wiki:abusefilter:throttle:2:user:3' (seems legit)
$count = 0 (always).

I think the problem is that AbuseFilter always uses Memcached for throttle, even if it's not enabled.

Change 92266 had a related patch set uploaded by Kaldari:
Only allow throttling if object caching is enabled...

https://gerrit.wikimedia.org/r/92266

  • Bug 55816 has been marked as a duplicate of this bug. ***

Change 92266 merged by jenkins-bot:
Only allow throttling if object caching is enabled...

https://gerrit.wikimedia.org/r/92266

saper added a comment.Nov 1 2013, 12:47 PM

Probably "throttle" should be taken out of the user interface if there is no memcached enabled?

Also "blockautopromote" is using memcached only and I believe this is actually bug 20487

The "fix" for this appears to be a band-aid. The throttle should be made to work without object caching, rather than simply being hidden when it is not present.

aaron added a comment.Jan 8 2014, 9:43 PM

(In reply to comment #8)

The "fix" for this appears to be a band-aid. The throttle should be made to
work without object caching, rather than simply being hidden when it is not
present.

Probably some code using $wgMemc can just use wfGetCache( CACHE_ANYTHING );

Daimona lowered the priority of this task from High to Medium.Apr 7 2018, 1:36 PM