Page MenuHomePhabricator

Abuse filter inconsistent matching between testing and real checking
Closed, DuplicatePublic

Description

When testing the abuse filter using either test on recent changes or test on given user, it does not match the page. However, the same page is actually matched by abuse filter on recent changes.

By checking the filter, it seems that tests are correct, but live matching is not.

See Also:

Details

Reference
bz41691

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:06 AM
bzimport added a project: AbuseFilter.
bzimport set Reference to bz41691.
bzimport added a subscriber: Unknown Object (MLST).

I saw this on zhwiki too, though I doubt it triggered $wgAbuseFilterConditionLimit but I'm not sure how that limit is calculated.

Message on such filter says it uses 27 conditions (which is actually quite weird, because even the sum of var settings, operators and functions used in the filter is lower than that). The other message says, that the limit is 1000 conditions.

From the recent progress in the meantime I assume, that every single change is matched by this filter, which I assume could be caused by some wrong condition in the extension which is always evaluated to true.

(In reply to comment #2)

Message on such filter says it uses 27 conditions (which is actually quite
weird, because even the sum of var settings, operators and functions used in
the filter is lower than that). The other message says, that the limit is 1000
conditions.

The limit of 1000 seems to be applied to the sum of condition numbers used by every filter (ie. it's applied on edits instead of edit-filter pairs).

I filed bug 41693 trying to reduce the number of conditions used by filters.

(In reply to comment #3)

The limit of 1000 seems to be applied to the sum of condition numbers used by
every filter (ie. it's applied on edits instead of edit-filter pairs).

Well, we have just 4 filters of which first 3 are quite simple. The sum is definitely not 1000 conditions at all.

It’s hard to tell whether it is the exact same problem, but I just filed a specific bug 45272 regarding the same inconsistency issue.

Recent example:

https://cs.wiktionary.org/wiki/Speci%C3%A1ln%C3%AD:Filtry_zneu%C5%BEit%C3%AD/6

In test mode, it matches this edit:

https://cs.wiktionary.org/w/index.php?oldid=441168&rcid=460250

but in runtime, it did not match it, thus did not trigger the related actions and log record.

(In reply to comment #7)

For convenience, here is the link to examine that edit:
https://cs.wiktionary.org/wiki/Special:AbuseFilter/examine/460250

BTW: is it intentional that the Template regex matches "{{ }}"?

(In reply to comment #8)

(In reply to comment #7)

For convenience, here is the link to examine that edit:
https://cs.wiktionary.org/wiki/Special:AbuseFilter/examine/460250

BTW: is it intentional that the Template regex matches "{{ }}"?

Thanks for the link.

Not necessarily. It is rather to not add more conditions and functions to the checking procedure. Though putting such string on user talk is highly improbable. However, it doesn't have an influence on the issue which this bug is about.