Page MenuHomePhabricator

AbuseFilter doesn't set any of the "moved_to..." variables anymore
Closed, DeclinedPublic

Description

I was trying to figure out why the filter
https://pt.wikipedia.org/wiki/Especial:Filtro_de_abusos/history/57/item/1114
didn't register any page moves since 2011 and to test it, I moved a page and noticed the variable moved_to_namespace wasn't set:
https://pt.wikipedia.org/wiki/Special:AbuseFilter/examine/40492602?uselang=en

The last time this filter worked was on this change from 2011-06-18T20:42:34:
https://pt.wikipedia.org/wiki/Special:AbuseFilter/examine/log/756582?uselang=en
Here, we see the variable "moved_to_namespace" was set to 3 as it should.


Version: unspecified
Severity: normal

Details

Reference
bz52053

Event Timeline

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

(In reply to comment #0)

The last time this filter worked was on this change from 2011-06-18T20:42:34:
https://pt.wikipedia.org/wiki/Special:AbuseFilter/examine/log/
756582?uselang=en
Here, we see the variable "moved_to_namespace" was set to 3 as it should.

Actually, we used to have all the following 9 variables:

  • moved_to_articleid
  • moved_to_namespace
  • moved_to_text
  • moved_to_prefixedtext
  • moved_to_restrictions_create
  • moved_to_restrictions_edit
  • moved_to_restrictions_move
  • moved_to_restrictions_upload
  • moved_to_recent_contributors

but none of them is available on current logs.

I confirmed that Thai Wikipedia also has this bug. Today I write a filter to prevent all moves from one namespace to another namespace with some exceptions. After testing, I found that almost every move is caught by the filter because "moved_from_namespace != moved_to_namespace" is always true, as moved_to_namespace is unset.

To be honest, I think that this bug is severe because all filters using this variable will not be functional. Imagine some wikis have a filter which is similar to the filter I tried to write today long ago. After some updates, moved_to_namespace is not functional; consequently, the filter blocks all moves.

If it is hard to fix this problem, it would be nice to have a patch temporarily removing the non-functional variables.

Created attachment 14198
patch to make moved_to... functional again. work well on my local wiki.

I am not familiar with gerrit, so I uploaded the patch here. Sorry for inconvenience.

Attached:

Change 104706 had a related patch set uploaded by Nullzero:
make MOVED_TO* working

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

Change 104708 had a related patch set uploaded by Parent5446:
LogEntry: Make newFromRow works with object

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

Change 104708 merged by jenkins-bot:
LogEntry: Make newFromRow work with RC object

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

This works locally and on enwiki[1], marking as WORKSFORME due to this.

Please notice that only testing AbuseFilter move-data generation from the recentchanges is broken, but that is only used for testing, not for real move filtering.

[1] https://en.wikipedia.org/w/index.php?title=Special:AbuseLog&wpSearchFilter=5

(In reply to comment #7)

Please notice that only testing AbuseFilter move-data generation from the
recentchanges is broken, but that is only used for testing, not for real move
filtering.

Is there a bug for that?

BTW: Isn't better to mark this bug as FIXED (by Gerrit change 104706) instead of WORKSFORME?

(In reply to comment #8)

(In reply to comment #7)

Please notice that only testing AbuseFilter move-data generation from the
recentchanges is broken, but that is only used for testing, not for real move
filtering.

Is there a bug for that?

Not that I know of... Also that issue should be fixed now, as I merged the above change.

(In reply to comment #9)

BTW: Isn't better to mark this bug as FIXED (by Gerrit change #104706)
instead
of WORKSFORME?

Don't think so, those are different issues.

  NODES
Bugs 1
Note 1
Project 1