Last modified: 2013-07-16 21:32:44 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 T32332, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30332 - API spamblacklist error should provide *all* blocked URLs, not just one
API spamblacklist error should provide *all* blocked URLs, not just one
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.20.x
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-11 19:49 UTC by Jarry1250
Modified: 2013-07-16 21:32 UTC (History)
7 users (show)

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


Attachments
Functional patch v1 (doesn't apply) (2.42 KB, patch)
2011-12-06 16:57 UTC, Jarry1250
Details
First part of functional patch (for core) (1.72 KB, patch)
2012-01-03 22:52 UTC, Jarry1250
Details
Second part of functional patch (for /extensions/) (1.72 KB, patch)
2012-01-03 22:55 UTC, Jarry1250
Details
First part of functional patch (for core) (corrected) (739 bytes, patch)
2012-01-09 23:25 UTC, Jarry1250
Details
Second part of functional patch (for /extensions/) (updated for bitrot) (1.72 KB, patch)
2012-01-31 22:49 UTC, Jarry1250
Details

Description Jarry1250 2011-08-11 19:49:45 UTC
At the moment, it's very hard to code a bot that can filter out blacklisted URLs whilst leaving other URLs.

A simple thing to help with this would be to have the API pass back all problematic URLs on the page, thus reducing the number of attempts to two (try -> filter -> try again) rather than a loop of changing one domain every time,a s at present.

Thanks.
Comment 1 Sam Reed (reedy) 2011-08-11 19:52:11 UTC
(In reply to comment #0)
> At the moment, it's very hard to code a bot that can filter out blacklisted
> URLs whilst leaving other URLs.
> 
> A simple thing to help with this would be to have the API pass back all
> problematic URLs on the page, thus reducing the number of attempts to two (try
> -> filter -> try again) rather than a loop of changing one domain every time,a
> s at present.
> 
> Thanks.

I don't actually think this is an api bug

			case EditPage::AS_SPAM_ERROR:
				$this->dieUsageMsg( array( 'spamdetected', $result['spam'] ) );

It's what gets returned back by the editpage...

Might be something looking to fix as part of bug 29246
Comment 2 Jarry1250 2011-12-06 10:33:18 UTC
Much as I hate gratuitous spam, I'd completely forgotten about this one. Reedy: any further thoughts? It's still a feature which would be genuinely useful, although there might be an existing pywikipedia, in which case probably less so.
Comment 3 Jarry1250 2011-12-06 16:57:18 UTC
Created attachment 9624 [details]
Functional patch v1 (doesn't apply)

A patch (couldn't get it to apply) but at least illustrative of the solution to this problem (the changes have the desired effect, have tested). Essentially, the tradeoff is that "spammers" get the full report of what they have tried to add that they cannot, in return for a slightly longer wait. This should be of benefit to any automated tools or content adders in dubious areas, who no longer have to query and requery: they can get a single report, remove all of the offending links, and then be certain that their next attempt will succeed.
Comment 4 Sam Reed (reedy) 2011-12-06 17:47:35 UTC
(In reply to comment #4)
> Created attachment 9624 [details]
> Functional patch v1 (doesn't apply)
> 
> A patch (couldn't get it to apply) but at least illustrative of the solution to
> this problem (the changes have the desired effect, have tested). Essentially,
> the tradeoff is that "spammers" get the full report of what they have tried to
> add that they cannot, in return for a slightly longer wait. This should be of
> benefit to any automated tools or content adders in dubious areas, who no
> longer have to query and requery: they can get a single report, remove all of
> the offending links, and then be certain that their next attempt will succeed.

How did you create it?

Start with a working copy of MediaWiki from svn, make the changes, then create the patch (svn diff > bug30332.diff)
Comment 5 Jarry1250 2011-12-06 18:04:27 UTC
(In reply to comment #5)
> How did you create it?
> 
> Start with a working copy of MediaWiki from svn, make the changes, then create
> the patch (svn diff > bug30332.diff)

Well, I was trying to create a patch against the 'installed' version of the SpamBlacklist extension. I think that was the problem (since the 'installed' version is not versioned).
Comment 6 Jarry1250 2012-01-03 22:52:59 UTC
Created attachment 9797 [details]
First part of functional patch (for core)
Comment 7 Jarry1250 2012-01-03 22:55:23 UTC
Created attachment 9798 [details]
Second part of functional patch (for /extensions/)

Sorry, I have core and extensions separate, so I've had to create two patches. These ones should apply and can be tested by copying from the extensions repo into the installed extensions folder (and making sure that SpamBlacklist is included!).

Tested on local installation and works perfectly.
Comment 8 Brad Jorsch 2012-01-09 22:39:09 UTC
Looks like you attached the same patch twice.
Comment 9 Jarry1250 2012-01-09 23:25:30 UTC
Created attachment 9829 [details]
First part of functional patch (for core) (corrected)

So I did. Think this should be the correct one.
Comment 10 Jarry1250 2012-01-29 16:34:15 UTC
Okay, so again, won't apply cleanly. On my to-do list to update (again).
Comment 11 Jarry1250 2012-01-31 22:49:39 UTC
Created attachment 9933 [details]
Second part of functional patch (for /extensions/) (updated for bitrot)

Updated patch so it applies cleanly again
Comment 12 Sumana Harihareswara 2012-02-10 20:43:34 UTC
Jarry, there's been a bit of a delay in the review of patches here -- as we prepare to get a new version out, we're in a "code slush" during which we concentrate on reviewing code that has already been committed to our source code repository (you might have already seen the details at http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/57950 ).  But we'll try to respond to your contribution soon.  My apologies for the wait.
Comment 13 Jarry1250 2012-03-26 17:59:45 UTC
Patches resubmitted under the new system:

https://gerrit.wikimedia.org/r/3740
https://gerrit.wikimedia.org/r/3747

I hope they can both be reviewed soon.
Comment 14 Jarry1250 2012-03-28 09:09:23 UTC
Review and merged, closing as FIXED

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


Navigation
Links