Page MenuHomePhabricator

Add ability to detect deleted revisions and page creation
Open, LowPublic


Tagging recreations of deleted pages would be a useful filter as patrollers have no easy way of noticing when that happens, but currently AbuseFilter does not support that. It would be nice if it had e.g. a variable for the number of deleted revisions.



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:54 PM
bzimport added a project: AbuseFilter.
bzimport set Reference to bz20892.
Tgr created this task.Sep 29 2009, 10:41 PM
  • Bug 66310 has been marked as a duplicate of this bug. ***
  • Bug 66031 has been marked as a duplicate of this bug. ***

I think the best way to implement this would be variables containing the number of live and deleted revisions.

Huji added a comment.Jun 9 2014, 7:00 PM

I think the "number" of deleted revisions is not something that should be exposed publicly (only sysops can see them outside the AbuseFilter, so only sysops can also see their count in the AbuseFilter's context). On the otherhand, the fact that the page was deleted (which is publicly available in logs) is something that can be also useful for AbuseFilter purposes. Hence my recommendation for a "has_been_deleted" variable in bug 66031.

Change 139103 had a related patch set uploaded by Huji:
AbuseFilter: Add ability to detect deleted revisions

Change 139105 had a related patch set uploaded by Huji:
AbuseFilter: Add ability to detect deleted revisions

Change 139105 abandoned by Huji:
AbuseFilter: Add ability to detect deleted revisions

Merged back into I4ec2c6aa1fc8aba1e6eb0563fec9ab05bb738d40

Huji added a comment.Jun 15 2014, 7:13 PM

I marked 139105 is abandoned because I finally figured out how to merge it back into (please check new patchset there)

Gerrit change 139103 has CR -2 now because there's no index to quickly get the number of times it has been deleted.

I was going to propose a variable with the number of deleted revisions, but I'm a bit shocked because the archive table has index for ar_namespace but not for ar_title (!!!) [1], so it will have the same problem. But because of that, does it mean that the message that appears on top of pages that have deleted revisions is using a slow query to get the number of deleted revisions, because there's no index for that? I guess there should be an index for this one (namespace and title).


Huji added a comment.Jun 23 2014, 2:00 AM

I believe the lack of index is a separate bug. Since we already have a functionality in MediaWiki itself that is using a non-indexed column to show a message to the user when trying to recreate a previously deleted page, one might say that having a similar functionality in AbuseFilter should not be prohibited just based on the lack of index. Regardless, I've created bug 66961 as a blocker, and will wait for that to be fixed before my patch for 20892 is implemented.

In the meantime, I would be grateful if one could review the latest patch to see if there are any *other* problems with it.

Qgil added a subscriber: Qgil.Jan 12 2015, 12:38 PM got a -2, and since there doesn't seem to be more progress in this task.

@Huji, this is one of the oldest tasks assigned to someone. Are you planning to work on it, and is its current priority correct?

Qgil removed Huji as the assignee of this task.Feb 14 2015, 3:49 PM
Qgil set Security to None.
Huji claimed this task.Feb 13 2017, 9:23 PM
Huji added a subscriber: hoo.

@Qgil I am retaking this issue, because I think the -2 was not entirely fair. I hope @hoo would revise his review given that an almost identical query is executed every time a delete page is viewed on the wiki anyway.

Change 139103 had a related patch set uploaded (by Huji):
AbuseFilter: Add ability to detect deleted revisions

Qgil removed a subscriber: Qgil.Feb 20 2017, 2:25 PM
matej_suchanek moved this task from Backlog to Filtering features on the AbuseFilter board.
matej_suchanek updated the task description. (Show Details)
matej_suchanek removed a subscriber: wikibugs-l-list.
Johan added a subscriber: Johan.Feb 22 2018, 2:09 PM

Any idea of when this could potentially go into production?

@matej_suchanek is actively reviewing my patch. Hopefully, soon.

whym awarded a token.Jul 2 2019, 11:40 AM
whym added a subscriber: whym.

Change 530949 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/extensions/AbuseFilter@master] Add ability to detect deleted revisions

I'm really not doing anything new in my patch, but I wrote it on my computer before learning this task exists, so I uploaded it so it's not lost. @Huji, any progress?