Commit graph

55 commits

Author SHA1 Message Date
paladox 5d882775f6 Add extensions.json, empty PHP entry point, remove i18n shim
Bug: T88059
Change-Id: I730a2012609f7dfac3d49012ae14038e6bcac3ae
2015-05-20 19:19:31 +01:00
jenkins-bot 2d8225460c Merge "Load SpamBlacklist from meta over HTTPS" 2014-04-07 17:37:31 +00:00
Faidon Liambotis f9e2fed9bf Revert "Categorize pages containing blacklisted links"
This resulted in doubling the appserver-memcached traffic across the
Wikimedia cluster.

This reverts commit 32b546a223.

Change-Id: I03e96a1bb223360e62d47f98a505cc5b26e5aadf
2014-03-31 09:06:56 +03:00
Siebrand Mazeland cda5d2a32c Migrate to JSON i18n
Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php
with shim.

Change-Id: I5b4012b0fb01b1baa7bbbd2457360cdb4a1a895a
2014-03-28 22:32:35 +01:00
Jackmcbarn 32b546a223 Categorize pages containing blacklisted links
Add pages containing links that match the spam blacklist to a tracking
category.

Change-Id: I694860bc77d05dccd81522efc23225481d51ee43
2014-03-11 11:23:38 -04:00
Jackmcbarn 57a417d181 Add an API action to test blacklisted URLs
Add API action spamblacklist, accepting parameter url, that returns the
parts of the URLs that match the spam blacklist, if any.

Bug: 54441
Change-Id: Ia6aea8b463fc63f951224520b8cc5abf185c5c74
2014-02-04 19:17:38 +00:00
Reedy 7f2781e06d Load SpamBlacklist from meta over HTTPS
Change-Id: I3c3d397d5779aa0affcfa8455c2197ac562c5424
2013-11-23 01:00:34 +00:00
Marius Hoch d3099d6e14 Add 'spamblacklistlog' to the list of available rights
Follow up to: I7b1ee2b

Change-Id: If97de3c400d4b659f13ff0d63ec7063e4ae5a427
2013-09-20 19:43:23 +02:00
jenkins-bot acaf4262d9 Merge "Log blacklist hits to Special:Log" 2013-09-08 00:58:41 +00:00
daniel a3defb8b91 (bug 51621) Make SBL aware of ContentHandler.
This changes SpamBlacklist to make use of the new, ContentHandler
aware hooks.

This change also includes some refactoring and cleanup which made
the migration to the new hooks easier.

Change-Id: I21e9cc8479f2b95fb53c502f6e279c8a1ea378a5
2013-08-24 19:55:55 +02:00
daniel dfb25d3f73 Fix missing default blacklist.
The default blacklist was no longer being used, because the line
$wgSpamBlacklistFiles =& $wgBlacklistSettings['spam']['files']
initialized $wgBlacklistSettings['spam']['files'] to null,
and BaseBlacklist::__construct then overrode $this->files
with null.

Change-Id: I22448bfb87eef6dd86b61362f3eb6bb2198a10b6
2013-07-31 12:52:38 +02:00
Kunal Mehta 48076ea845 Log blacklist hits to Special:Log
Adds a logBlacklistHit function function, which is callend whenver a new url
matches the blacklist. A new log type of "spamblacklist" is created, and is only
viewable by people with the "spamblacklistlog" userright. This is given to sysops
by default.

By default this is disabled, and is controlled by $wgLogSpamBlacklistHits.

Bug: 1542
Change-Id: I7b1ee2b3bb02b693d695bf66d157e2c33526c919
2013-07-22 13:50:52 -07:00
Siebrand Mazeland e9874344aa Maintenance for SpamBlacklist extension.
* Replace deprecated methods. MediaWiki 1.19 required.
* Replace <tt> with <code>.
* Update documentation.
* Use WikiPage instead of Article for doEdit().
* Use __DIR__ instead of dirname( __FILE__ ).
* Remove superfluous newlines.

Change-Id: I3a0e42ca404638f7c7934c316735ad11cbc99d42
2012-09-03 16:50:18 +02:00
Victor Vasiliev 1d03a612bc Remove Wikimedia-specific configuration from the extension.
I am on a slow connection today and it took me about an hour
to understand why does saving a page take about 25 seconds.

Note: this commit requires changes to Wikimedia configuration files.

Change-Id: I2d99fe36c3371d2a2a22dbb68e063287d9f4f82d
2012-05-26 16:22:38 +04:00
John Du Hart c46d18a7b3 Add default to SpamBlacklist for backward compatibility 2012-02-21 23:48:52 +00:00
Sam Reed 90f3afa152 Swap
version_compare($wgVersion, '1.17alpha', '>=') ? 'antispam' : 'other'

for

'antispam'
2012-02-13 14:06:45 +00:00
John Du Hart aaf4d74d18 Adding Email blacklisting to the SpamBlacklist extension
This relies on r109111
2012-01-18 23:29:37 +00:00
John Du Hart 62b2bde146 Refactored SpamBlacklist to be extendable for other blacklist types
This is the groundwork for Bug 33761
2012-01-17 06:13:46 +00:00
Brion Vibber 41ba28a083 Update a butt-ton of extension about URLs to point to https://www.mediawiki.org/ 2011-12-13 23:49:33 +00:00
Alexandre Emsenhuber b16bb18e5a Dropped pre-1.12 compatibility code 2011-05-27 19:26:00 +00:00
Yaron Koren b6408039cd Added some minor backwards-compatibility, so trunk version can work with MW 1.16 and earlier 2011-02-17 00:24:24 +00:00
Daniel Friesen 3e98b04647 Followup r78590, apparently the code that puts unknown categories of extensions into 'other' was not implemented until MediaWiki 1.17... *sigh* So we need to include a version check on these extensions until they stop supporting pre-1.17 versions of MediaWiki. 2010-12-20 04:05:54 +00:00
Daniel Friesen b1bbadbab4 Change extension group 'other' for some of our antispam extensions into the new 'antispam' extension groups. Pre trunk wiki will just keep displaying them in 'other' anyways till release. 2010-12-19 01:59:11 +00:00
Philip Tzou 37db27ea98 Follow up r77321. Replace EditPage::spamPage to $editPage->spamPageWithContent in wfSpamBlacklistFilterMerged.
I did nothing to wfSpamBlacklistFilter which seems has been replaced by wfSpamBlacklistFilterMerged.
2010-11-26 07:53:30 +00:00
Sam Reed 084b83b7e2 Start removing/fixing calls to deprecated methods in WMF used extensions 2010-10-29 15:14:44 +00:00
Sam Reed bd70950a8a Minor revert of CentralNotice.db.php
Add some braces

Remove more unused variables
2010-07-26 21:55:18 +00:00
Chad Horohoe 66fb39a8f9 Revert r66934 (Removing wfLoadExtensionMessages() from everything). I disagree on principle...we branch extensions for this very reason. But people want trunk extensions compatible for several versions back, meh. 2010-05-27 15:56:53 +00:00
Chad Horohoe 67107030b7 Large commit. Removed 800+ references to no-op wfLoadExtensionMessages() 2010-05-26 22:25:32 +00:00
Siebrand Mazeland e7afc5618a * Remove $wgExtensionCredits['description'] where $wgExtensionCredits['descriptionmsg'] present. This feature was introduced in MediaWiki 1.12, and 'description' is not used if 'descriptionmsg' is present.
* Random indentation updates and trailing whitespace removed
2010-02-22 23:41:51 +00:00
Brion Vibber fc6599f18e Cleaning up some old PHP 4 object-reference usage in some edit filtering hooks.
There was a mix of uses of the reference and non-uses of the reference. :)
Reverts r53714 and fixes it from the other end by cleaning up the uses to not expect references.
2009-08-21 21:51:29 +00:00
Shinjiman 25c0434d7d Follows up r49890, adding file location itself to obtaining the revision number shown in the Special:Version 2009-04-27 04:45:10 +00:00
Chad Horohoe 0c77258c51 Big commit. Removing svn-version and svn-date from extensions. Per the list, these versions do not give valuable information and are often wildly inaccurate. 2009-03-26 17:39:49 +00:00
Siebrand Mazeland fbbdf814d4 (bug 16120) Prevent death on Spam Blacklist trigger using API. Patch by Brad Jorsch.
An API edit attempt with Spam Blacklist firing will now output something instead of crashing:

<?xml version="1.0"?><api><edit spamblacklist="http://blacklistme.example.com"
result="Failure" /></api>
2008-11-02 22:40:02 +00:00
Aaron Schulz 51ebe6aab0 Fix mixed up params 2008-08-16 21:40:30 +00:00
Chad Horohoe 0909094e01 And now SpamBlacklist checks the edit summary field. 2008-06-19 03:14:34 +00:00
Aaron Schulz f6ecf15e42 Fix E_SCRICT errors and pass-by-ref error. Blank pages getting thrown around. 2008-05-14 12:44:34 +00:00
Tim Starling 1dc3f3e263 Don't call preg_replace ~80 times per request. Leave the heavy lifting to Special:Version, using the new svn-revision member of $wgExtensionCredits. 2008-05-06 11:59:58 +00:00
Rotem Liss 3ddce3e21f Avoid warnings about call-time pass-by-reference. 2008-03-14 18:31:28 +00:00
Siebrand Mazeland f97248426a * add svn:keywords 'LastChangedDate'
* replace text 'version' in ExtensionCredits with version based on 'LastChangedDate' for automatic version updating
2008-02-27 14:13:10 +00:00
Bertrand Grondin 36b4a729c7 fix call function error 2008-02-17 19:48:47 +00:00
Bertrand Grondin 5f45250412 Add internationalization extension description message in [[Special:Version]] 2008-02-16 20:47:29 +00:00
Siebrand Mazeland 84c26ca799 revert r28371 to r28375 2007-12-16 18:27:23 +00:00
Siebrand Mazeland 03c931aa7c * complete $wgExtensionCredits
* remove trailing whitespace
2007-12-10 21:33:25 +00:00
Tim Starling 1f195dbc54 * Optimised startup
* Use the new EditFilterMerged hook if available, for faster link finding
* Random bits of code were leaking out of the body file into the loader, poked them back in.
2007-11-12 07:44:17 +00:00
Brion Vibber cc1ddc1162 Break spam blacklist log info out to a sep file 2007-10-03 00:19:36 +00:00
Raimond Spekking 7df7acb6e0 Use $badLines instead of $badList for PLURAL: counting.
count( $badList ) is always 1 as it is a string.
2007-07-24 10:32:37 +00:00
Brion Vibber bde084c272 Some polishing and refactoring on this monstrosity, it's been allowed to grow without some good snipping in a while. :)
* Handle bad regexes more gracefully:
 - The batched regexes are tested for validity, and if one is bad, the lines from that source are broken out line-by-line. This is slower, but the other lines in that source will still be applied correctly.
 - Suppress warnings and be more verbose in the debug log.
 - Check for bad regexes when a local blacklist page is edited, and prompt the user to fix the bad lines.
* Caching issues:
 - Cache the full regexes per-DB instead of per-site; this should be friendlier to shared environments where not every wiki has the same configuration.
 - Hopefully improve the recaching of local pages, which looked like it would preemptively apply the being-edited text to the cache during the filter callback, even though something else might stop the page from being saved. Now just clearing the cache after save is complete, letting it re-load later.
* Split out some of the regex batch functions for clarity.

There are probably still issues with caching of HTTP bits, and in general the local DB loading looks verrrry fragile.
Test this a bit more before syncing. :)
2007-07-20 21:13:26 +00:00
Raimond Spekking 48689b2bca Make the long existing message 'spam-whitelist' available to [[Special:Allmessages]]. 2007-07-04 11:28:52 +00:00
Aryeh Gregor 740736ecd9 Extensions too! 2007-06-29 01:36:09 +00:00
Raimond Spekking 1676db1b55 Update/Add extension credits URLs 2007-06-26 10:38:04 +00:00