Last modified: 2014-08-12 15:47:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T69875, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67875 - GlobalRename: Page moves are being blocked by local abusefilters
GlobalRename: Page moves are being blocked by local abusefilters
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
CentralAuth (Other open bugs)
unspecified
All All
: Normal normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 67936
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-11 19:11 UTC by Kunal Mehta (Legoktm)
Modified: 2014-08-12 15:47 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2014-07-11 19:11:08 UTC
[[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.
Comment 1 Kunal Mehta (Legoktm) 2014-07-11 19:33:08 UTC
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???
Comment 2 Marius Hoch 2014-07-12 09:15:18 UTC
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)
Comment 3 Kunal Mehta (Legoktm) 2014-07-12 09:26:13 UTC
(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';
}
Comment 4 Marius Hoch 2014-07-12 09:28:59 UTC
(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.
Comment 5 Gerrit Notification Bot 2014-07-13 00:14:08 UTC
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
Comment 6 Kunal Mehta (Legoktm) 2014-07-13 00:18:38 UTC
(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.
Comment 7 Gerrit Notification Bot 2014-07-23 09:13:25 UTC
Change 145870 merged by jenkins-bot:
Hack: Prevent AbortMove hook from interfering with GlobalRename page moves

https://gerrit.wikimedia.org/r/145870
Comment 8 Kunal Mehta (Legoktm) 2014-07-23 09:16:19 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links