Last modified: 2014-07-17 22:39:23 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 T68994, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66994 - Global blocks do not stop flow spam
Global blocks do not stop flow spam
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Matthew Flaschen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-23 20:26 UTC by Jasper Deng
Modified: 2014-07-17 22:39 UTC (History)
7 users (show)

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


Attachments

Description Jasper Deng 2014-06-23 20:26:15 UTC
https://www.mediawiki.org/wiki/Special:GlobalBlockList/37.59.32.148 did not stop https://www.mediawiki.org/wiki/Special:AbuseLog/44335

This might be because it's a global rangeblock rather than a single block, but I did place a local block for this IP as a result. Also, I'm not sure if even ordinary local blocks stop it (abuse filter obviously does), as we'll have to see if the local block stops it.
Comment 1 Kunal Mehta (Legoktm) 2014-06-23 23:38:20 UTC
Flow calls Title::userCan (https://github.com/wikimedia/mediawiki-extensions-Flow/blob/42e8d57fe5ff07d8c26b9d7add5e8749aecdd328/includes/WorkflowLoader.php#L249), which GlobalBlocking hooks into. Maybe something is bypassing that check?
Comment 2 Jasper Deng 2014-06-24 20:16:54 UTC
Same deal with https://www.mediawiki.org/wiki/Special:Contributions/94.23.251.211 and https://www.mediawiki.org/wiki/Special:Contributions/123.125.19.44 , the latter of which is a single global block, so it is not limited to just global rangeblocks.
Comment 3 Jasper Deng 2014-06-24 20:31:36 UTC
Also https://www.mediawiki.org/wiki/Special:Contributions/37.187.0.0/16

I don't know why the check is failing, but chances are that these are being submitted through the API, in case that makes a difference.
Comment 4 Jasper Deng 2014-06-24 22:11:11 UTC
This also doesn't look good. https://www.mediawiki.org/wiki/Special:Block/185.8.237.178 is a tor node, so it might not just be limited to global blocks.
Comment 5 Jasper Deng 2014-06-24 22:12:17 UTC
https://www.mediawiki.org/wiki/Special:Block/172.245.142.156 is both!
Comment 6 Matthew Flaschen 2014-06-25 22:15:30 UTC
If I understand the report, it's saying that AbuseFilter is blocking it, whereas you expect it to be blocked by Flow.

Are there any edits that actually went all the way through when they were blocked at the edit-time?

Otherwise, this could just be a hook registration order issue.
Comment 7 Kunal Mehta (Legoktm) 2014-06-25 22:32:59 UTC
Edit permissions should be being checked before it runs through the AbuseFilter. If the user can't edit the page, it shouldn't be wasting time running through the AbuseFilter/SpamBlacklist/etc.
Comment 8 Matthew Flaschen 2014-06-25 22:35:29 UTC
(In reply to Kunal Mehta (Legoktm) from comment #7)
> Edit permissions should be being checked before it runs through the
> AbuseFilter. If the user can't edit the page, it shouldn't be wasting time
> running through the AbuseFilter/SpamBlacklist/etc.

Yeah, I researched more closely after that, and they're different hooks anyway.  AbuseFilter doesn't even use the getUserPermissionsErrorsExpensive/userCan hook
Comment 9 Matthew Flaschen 2014-06-25 22:55:11 UTC
In core, EditPage->edit calls EditPage->getEditPermissionErrors

That calls Title->getUserPermissionsErrors with the default expensive true, which triggers hook checks

Later EditPage->edit calls EditPage->attemptSave(), which calls EditPage->internalAttemptSave().

That then calls EditPage->runPostMergeFilters which does the EditFilterMergedContent, etc checks.

---

Erik noted that in Flow, it's done in a different order.  Specifically, WorkflowLoader calls Block->onSubmit early, which in turn calls Block->validate, which eventually checks the spam filters.

Then, only later does it check blocking and userCan.
Comment 10 Gerrit Notification Bot 2014-06-26 00:42:58 UTC
Change 142170 had a related patch set uploaded by Mattflaschen:
Remove explicit isBlocked(), change permission ordering to match core

https://gerrit.wikimedia.org/r/142170
Comment 11 Gerrit Notification Bot 2014-06-26 20:44:20 UTC
Change 142395 had a related patch set uploaded by EBernhardson:
Remove explicit isBlocked(), change permission ordering to match core

https://gerrit.wikimedia.org/r/142395
Comment 12 Gerrit Notification Bot 2014-06-26 20:44:55 UTC
Change 142170 abandoned by EBernhardson:
Remove explicit isBlocked(), change permission ordering to match core

Reason:
@matt I'll go ahead and take over this patch

frontend-rewrite branch is closed, resubmitted against master as https://gerrit.wikimedia.org/r/142395

https://gerrit.wikimedia.org/r/142170
Comment 13 Gerrit Notification Bot 2014-07-09 22:25:22 UTC
Change 142395 merged by jenkins-bot:
Remove explicit isBlocked(), change permission ordering to match core

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

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


Navigation
Links