Page MenuHomePhabricator

GlobalRename: Page moves are being blocked by local abusefilters
Closed, ResolvedPublic

Description

[[Special:Log/abusefilter]] hit * Ruslik0 * Ruslik0 triggered [[Special:AbuseFilter/10|filter 10]], performing the action "move" on [[User talk:皆木]]. Actions taken: Warn ([[Special:AbuseLog/4600|details]]) was seen on incubatorwiki by Vogone.

I assume local renameuser has the same problem too, since I just copy-pasted the code.


Version: unspecified
Severity: normal

Details

Reference
bz67875

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 3:39 AM
bzimport set Reference to bz67875.
bzimport added a subscriber: Unknown Object (MLST).
Legoktm created this task.Jul 11 2014, 7:11 PM

The least-evil idea I could come up with is just setting $wgHooks['AbortMove'] = array(); while moving pages, and then resetting it afterwards.

Out of WMF-deployed extensions, grep found:

  • AbuseFilter
  • EducationProgram
  • JsonConfig
  • LiquidThreads
  • TitleBlacklist (also could block page moves)
  • WikimediaIncubator

The only extension where such a thing would be unsafe looks to be LQT...it's doing some scary database updates in an abort hook???

hoo added a comment.Jul 12 2014, 9:15 AM

I think the only thing we really want to remove from the array over here (or disable in another way) is AbuseFilter... maybe there's another way to achieve this, but I can't think of anything offhand.

Maybe we finally want to implement a user right that makes one completely skip AbuseFilters (Wikia has something like that in an own extension, but the code's ugly)

(In reply to Marius Hoch from comment #2)

I think the only thing we really want to remove from the array over here (or
disable in another way) is AbuseFilter... maybe there's another way to
achieve this, but I can't think of anything offhand.

$pos = array_search( 'AbuseFilterHooks::onAbortMove', $wgHooks['AbortMove'] );
if ( $pos !== false ) {
unset( $wgHooks['AbortMove'][$pos] );
}

// move page code

if ( $pos !== false ) { // cleanup
$wgHooks['AbortMove'][$pos] = 'AbuseFilterHooks::onAbortMove';
}

hoo added a comment.Jul 12 2014, 9:28 AM

(In reply to Kunal Mehta (Legoktm) from comment #3)

(In reply to Marius Hoch from comment #2)

I think the only thing we really want to remove from the array over here (or
disable in another way) is AbuseFilter... maybe there's another way to
achieve this, but I can't think of anything offhand.

$pos = array_search( 'AbuseFilterHooks::onAbortMove', $wgHooks['AbortMove']
);
if ( $pos !== false ) {
unset( $wgHooks['AbortMove'][$pos] );
}
move page code
if ( $pos !== false ) {
cleanup
$wgHooks['AbortMove'][$pos] = 'AbuseFilterHooks::onAbortMove';
}

On a scale of one to evil that's super evil... if this is a major problem I'm ok with doing this for now, as long as we at least create a bug for fixing this properly.

Change 145870 had a related patch set uploaded by Legoktm:
Hack: Prevent AbuseFilter from interfering with GlobalRename page moves

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

(In reply to Marius Hoch from comment #4)

On a scale of one to evil that's super evil... if this is a major problem
I'm ok with doing this for now, as long as we at least create a bug for
fixing this properly.

Agreed. I'm concerned that out of 2 of the 3 global renames so far, AbuseFilters have been triggered. On a local rename, it's much easier to check if you've triggered any filters, but not so much on a global scale.

My patch logs any hits to a debug file (will need to add a group on the cluster), so after say, 10 or 20 more renames, we can evaluate whether doing this is actually necessary.

Change 145870 merged by jenkins-bot:
Hack: Prevent AbortMove hook from interfering with GlobalRename page moves

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

Hack is merged, but we still need a proper solution. Setting bug 67936 as a blocker, since I think that is the best way to move forward here.

Legoktm closed this task as Resolved.Mar 1 2015, 4:02 AM
Legoktm claimed this task.
Keegan moved this task from Backlog to Closed on the GlobalRename board.Apr 29 2015, 8:47 PM