Commit graph

318 commits

Author SHA1 Message Date
jenkins-bot cb7dc7fa63 Merge "Make MOVED_TO* var generating from RecentChanges working" 2014-01-19 23:54:15 +00:00
nullzero 6c89ccc2fe Make MOVED_TO* var generating from RecentChanges working
This patch fixes the generation of MOVED_TO vars from
recentchanges rows.

Change-Id: I6c5471620a0fb5cb78b946fc162ff3d6a30b0e0e
2014-01-20 00:48:23 +01:00
Anjana S 4a5b76539d Increased the number of rows in AbuseFilter's Filter testing textarea
The text areas for the table row had only 5 rows, which is a lot less than
 the default number of rows.So now the number of rows in the testing textarea is changed to 15.

Bug: 59869
Change-Id: I9f221e7a49473ae1d473333f7ecf26235366d257
2014-01-12 21:04:52 +05:30
jenkins-bot 2125c3e341 Merge "Removing AbuseFilter::checkConditions' param" 2014-01-07 19:28:46 +00:00
Hoo man 91ff9853ce Merge "Add triggered filter id as parameter to messages" 2014-01-05 21:04:09 +00:00
Matthias Mullie 84536df324 Removing AbuseFilter::checkConditions' param
I'm not really sure why it exists; I assume to minimize overhead of init'ing
multiple AbuseFilterParser objects that would be exactly the same.

However, checkConditions() - which checks one specific condition - is not really
an "endpoint" you will want to call in <your-extension-that-uses-AbuseFilter>.
You're more likely to call something higher-lever (like
AbuseFilter::filterAction, which will take care of fetching all appropriate
filters, as well as run them through checkConditions, and much more). This will
trickle down to ::checkAllFilter, down to ::checkFilter, which would eventually
call ::checkConditions with the 'keepvars' argument.
Basically, unless you're re-implementing much of AbuseFilter yourself, you won't
get to pass anything other than 'keepvars' to checkFilter.
As a result, even though you may call AbuseFilter to call on multiple different
vars, it will re-use the same parser with the first vars.

I'm proposing to drop the 'keepvars' and just keep the vars around instead.
checkFilter can compare previous vars with new vars, and only init a new Parser
if the vars are different.

Change-Id: I96ccc60c77f3cdbb82c0f9f16782a1a44ffb1592
2013-12-30 12:15:59 +01:00
jenkins-bot 1f6936c8b3 Merge "Send AbuseFilter hits to CheckUser" 2013-12-26 22:13:45 +00:00
se4598 2c30df42c5 Add triggered filter id as parameter to messages
Bug: 50464
Change-Id: I82f1c7f021c8d95fe50fd4da4bc57a8850bbbb84
2013-12-26 22:09:03 +01:00
Kunal Mehta ba6d178f07 Send AbuseFilter hits to CheckUser
Bug: 29583
Change-Id: I175f95b7118dab87de208cfb729e14403a670680
2013-11-10 12:34:48 -08:00
Siebrand Mazeland 2bb441ee9c Declare visibility on class properties
Also compress some variable documentation.

Change-Id: I47d31e18df18492373aa407ea19f1a81b2cf5d57
2013-11-06 16:11:09 +00:00
Siebrand Mazeland ddc930e897 Ensure variables are defined
Change-Id: Iab1d36b0162c1d7a91cdd80ac36bbf338e7df61d
2013-11-06 17:09:24 +01:00
jenkins-bot 14871447ee Merge "Adding some comments to explain what various classes are for." 2013-11-05 13:26:15 +00:00
kaldari 307b078ada Only allow throttling if object caching is enabled...
...otherwise it doesn't work.

This change add 2 checks for object caching, one for the filter
configuration interface, and one for the actual throttle checking.

Bug: 50894
Change-Id: I89ebcc6ff7d91d3a9ad8e744c0c4ff3e33e3b673
2013-10-31 14:59:26 -07:00
kaldari b165827b67 Adding some comments to explain what various classes are for.
Change-Id: Ic44342035bc277dfd75c1da06a3a1205e8c659a4
2013-10-24 15:11:08 -07:00
Siebrand Mazeland 632365e834 Create consistent return point
Change-Id: Iaca35d1d9e94c027b580ead8bec102d1f6306105
2013-10-15 14:27:10 +02:00
Siebrand Mazeland 84d5cd33a2 Remove unused local variables
Change-Id: If708a112ae6df070da19f52682f0e2b19fe67959
2013-10-14 21:39:35 +02:00
Siebrand Mazeland 563bf12331 Pass correct variable to closure
Corrects Change-Id I3d8ace509ec0a9471cc68be3398bb1c108d6e570.

Change-Id: I5937aef91710e48c5417cff55f824ae67825097d
2013-10-14 21:39:05 +02:00
Brad Jorsch 0ef6f6dcce Reset $wgTitle in AbuseFilter::filterAction()
If AbuseFilter::filterAction changed $wgTitle, we need to reset it back
to the old value before returning.

And for good measure, we also need to check the main RequestContext to
make sure it didn't cache the bogus $wgTitle on us.

Bug: 53498
Change-Id: I4d706a1ee07f0b171f98e7d558d7be27e6759614
2013-09-30 14:37:52 -04:00
Aaron Schulz 5c322d6f31 Fixed "A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE" memcached errors
Change-Id: I27b51a4baec34475513407b604cf4c5fcd561cc9
2013-09-17 16:52:19 -07:00
jenkins-bot 74f8ecc379 Merge "Push counter updates to transaction end to avoid contention" 2013-08-30 22:35:35 +00:00
Aaron Schulz a951290cb7 Push counter updates to transaction end to avoid contention
Change-Id: I3d8ace509ec0a9471cc68be3398bb1c108d6e570
2013-08-28 14:31:08 -07:00
Yuki Shira a84e56bd39 Give grep a chance to find the usages
Change-Id: I65fbf2b7cd8d03c669646607e3841eb7d69b4e75
2013-08-18 15:35:16 +09:00
jenkins-bot 963655c81e Merge "New variable: new_pst which provides a PSTed version of new_wikitext" 2013-08-08 08:01:47 +00:00
Marius Hoch fb40850d9e Make sure a session has been started prior to using it
Thanks Anomie for pointing this out.

Change-Id: Ieaa9847e74c35e3080dabeaef8895209bfcc675b
2013-07-31 18:46:43 +02:00
Marius Hoch 4cb9a96ac9 Don't trigger filter hits for nonexisting filter 0
AbuseFilter::getConsequencesForFilters uses filter ids as
array keys, that causes problems if both local and global
filters were hit, because array_merge reindexes arrays.

Example:
https://www.mediawiki.org/wiki/Special:AbuseLog/18687

Change-Id: I81cb110322461e30113199cfa313cd8e8e8b2262
2013-07-09 13:57:22 +02:00
Marius Hoch 8957c003ba Revert "Change AbuseFilter to use UserCache instead of user_text fields"
This reverts commit aaa256aa94.

Bug: 49918
Change-Id: I597cbc03e2ecc45cfcca632232d5bbb1ef7be9d8
2013-06-27 01:01:15 +02:00
Marius Hoch 89726ae861 Allow filtering links and html for page creations
Right now it's impossible to filter added_links etc.
for page creations.

(Only slightly tested)

Change-Id: Iee07fc8bfe41e78abb73d8ae969aa1e4d97339bc
2013-06-05 03:52:29 +02:00
Marius Hoch a7aa0fa185 Fix AbuseFilter::disableConditionLimit()
Used for Special:AbuseFilter/test

Change-Id: I964efbbb0be7cae418746667778874790fdbb499
2013-05-28 00:43:33 +02:00
Liangent 8be81448bd New variable: new_pst which provides a PSTed version of new_wikitext
It's observed that some vandals use {{subst:void}} to trick the system
and other users and this new variable may help.

It would be nice to be possible to diff this variable against
old_wikitext, but it needs some performance consideration.

Change-Id: I4c4c4e806663363b40936363d659c42016e18cf6
2013-04-24 23:01:57 +08:00
jenkins-bot 84487b86d8 Merge "Deprecate addHolder for addHolders." 2013-04-23 21:22:37 +00:00
nischayn22 454a7cc897 Deprecate addHolder for addHolders.
lot of code was using ::merge() to create a new AbuseFilterVariableHolder
this is now simplified using a single addHolders method.

merge() still exists as its usful as a static function.
addHolder() is deprecated.

Change-Id: Ia4f6a56f642242a04cf2973b74ce44d91fce00eb
2013-04-23 23:19:32 +02:00
Kunal Mehta 4bec58cd54 Add a "ucase" function to convert the provided string to uppercase.
I basically took the lcase code and tweaked it to work for uppercase.

Bug: 47321
Change-Id: I230dbd99c27bf3a4a042befd6d334b4c0439bde0
2013-04-17 11:48:15 -05:00
Aaron Schulz 05b38eb613 Merge "Change AbuseFilter to use UserCache instead of user_text fields" 2013-04-09 22:00:51 +00:00
Siebrand Mazeland 3ff9084c2d Fix PHPDoc comments
Change-Id: I7d6da503d909d06b9a10cb55144852e1c4d07569
2013-04-01 11:04:03 +02:00
Alex Monk aaa256aa94 Change AbuseFilter to use UserCache instead of user_text fields
Change-Id: I51210ff91366a3a1610d34ca20e8966aaded89a0
2013-03-27 15:59:34 +00:00
Marius Hoch 42bd0d84f4 AbuseFilter: Change format of database logging/ performance
AF is setting several lazy load variables for the currently editing user.
To do this it's passing along the user name extracted from a user object
and generating a new user object later from that name which is of course
pointless. With this patch I'll pass user objects directly to prevent that.
On top of that I've deprecated a method in AFComputedVariable::compute which
was redundant as there is a more generic one which can solve that task
just fine.

Furthermore I've changed the logging behaviour from serializing the whole
AbuseFilterVariableHolder object to only store the variables. That has two
major advantages:
 * The amount of data that needs to be saved on a filter hit is reduced
   to about 1/10 of what the old version needed.
 * This is much more forward compatible as the old way of saving this
   relied on the class structure to stay the same while this is a simple
   array containing the vars.

On top of that we now only log variables already set by the time
a filter is hit. On top of the obvious performance increasement
that makes it easier for the user to spot the relevant data.

Another thing this change alters is the way the AbuseFilter internally
works with AbuseFilterVariableHolder objects. Right now we use one for
testing the filter(s) and later we use another one to compute the same
data again in case a filter was hit (for logging)!

This is not thoroughly tested yet, but way more sane than what we're
currently doing!

Change-Id: Ib15e7501bff32a54afe2d103ef5aedb950e58ef6
2013-02-28 22:35:22 +01:00
Marius Hoch fdae51ec07 Fix default for $wgAbuseFilterAnonBlockDuration
$wgAbuseFilterAnonBlockDuration didn't default to the actual
value of $wgAbuseFilterBlockDuration but to the default value
of that (which is indefinite). Fixed that (untested)

Change-Id: I26a929bfba997b80445a108e212030fe7faa6428
2013-02-23 00:20:29 +01:00
Hoo man e817f73f13 Merge "Check against $wgAbuseFilterRestrictedActions instead of hardcoded list for block actions" 2013-02-19 13:09:51 +00:00
Hoo man d858cfca35 Merge "Check that $title is defined and is a Title object" 2013-02-19 12:41:39 +00:00
jeblad 53e230c5c7 Check that $title is defined and is a Title object
During testing the context does not always contain a valid
Title object. In those cases AbuseFilter will fail hard.
This changeset makes the filter survive some of those
failures.

Change-Id: I0b2247432619ddf15cc17ed41b4b7a6a11e910e0
2013-02-19 13:39:47 +01:00
Hoo man 750f594b0f Merge "Create variable to set length of IP blocks" 2013-02-19 12:30:53 +00:00
Reedy d729a0ee02 Bug 43011 - AbuseFilter: Invalid argument supplied for foreach
Change-Id: I83f17b1747dd46998ffab2b6f7f867ab24c665a1
2013-02-11 22:30:59 +00:00
Kunal Mehta b8f53e27c3 Create variable to set length of IP blocks
This creates a $wgAbuseFilterAnonBlockDuration, which
allows for IP blocks to have a different length.

For backwards compatability this is default set to
$wgAbuseFilterBlockDuration.

Change-Id: Ibfd5c9639317150442f745a5759f3c34b38de274
2013-02-08 04:59:54 -06:00
Kunal Mehta acb123b148 Check against $wgAbuseFilterRestrictedActions instead of hardcoded list for block actions
Currently $wgAbuseFilterDisallowGlobalLocalBlocks checks against a
hardcoded list for "block actions", which means that extensions
like GlobalBlocking cannot add actions to it.

Change-Id: I6ac5125782cf0029447948d6d0080103700e397c
2013-02-08 02:17:17 -06:00
daniel c1f8d749a7 Allow special pages as context for abuse filter.
The title in the context provided for an edit may be a special page
in some cases, e.g. when an extension uses a special page for creating
new content, and the final name of the content is not yet known
when the EditFilterMergedContent hook is called.

This change will allow special pages to be used in this context.

Change-Id: I5551bff69e3b617a437bd043fdc893dbdcd9f09f
2013-01-22 14:08:50 +01:00
Marius Hoch c4e78e9713 (bug 18174) Added Older and Newer change link to Abusefilter diff
On top of that I changed /history to no longer show the
changes link if it's the first revision of the filter.

As I was on it I fixed the diff selection for diffs like
history/1/diff/2/next where change number 2 was compared
to the last change of the filter instead of the next one.
This probably went unnoticed because the /next action isn't
linked anywhere within the software itself.

Change-Id: Ic28bb696a4dbbb75e0bfcae1843ccefab1a9508a
2013-01-18 10:42:22 +01:00
Hoo man 24427e6d76 Merge changes I72e1a6dd,Ibb9d4c9a
* changes:
  Use Status object to report filter results.
  (bug 42064) AbuseFilter + EditFilterMergedContent
2013-01-17 17:43:32 +00:00
daniel 6522f70fb8 Use Status object to report filter results.
This changes the AbuseFilter to use Status objects for internal
error handling. This allows for more flexibility in passing error
messages back from hooks and avoids double escaping.

Change-Id: I72e1a6dd7dee19f889fc13b60456e9bfebd5e22b
2013-01-17 18:34:19 +01:00
daniel f3788c4f0c (bug 42064) AbuseFilter + EditFilterMergedContent
This makes AbuseFilter use EditFilterMergedContent if support for
the ContentHandler infrastructure is present. This means living
without some nice bits of context, because EditFilterMergedContent
doesn't provide an EditPage object.

This requires core change I99a19c93 to work correctly.

Change-Id: Ibb9d4c9a36b8a199213958b920902e8006c71fe8
2013-01-17 11:18:28 +01:00
Kunal Mehta 772a9fa619 (bug 28362) add conditional article_views variable
If $wgDisableCounters is set, using the variable will result
in a syntax error for an undefined variable.

Change-Id: I136484356506c87ac0e2ede088787e854a0a2fa9
2013-01-16 17:03:47 +01:00
Hoo man a885db279d Merge "Let AbuseFilter work with 1.19" 2013-01-09 01:42:29 +00:00
CSteipp b8b799630b Merge "Properly integrate $wgAbuseFilterValidGroups" 2013-01-07 23:01:48 +00:00
csteipp 586598b5b2 Let AbuseFilter work with 1.19
This patch allows the current AbuseFilter to work with 1.19, by only
using MWTimestamp if MediaWiki is version 1.20 or later.

Api still needs fixing, but this will get filters running.

Change-Id: I7c9eaf777d529ce15dfd85761784f9ad1443f2bf
2013-01-07 14:53:57 -08:00
Matthias Mullie 0c174aec42 Properly integrate $wgAbuseFilterValidGroups
The concept of different AbuseFilter groups had not properly been integrated, but should be now:
- The total number of matches is now group-specific
- .. Which will also fix the emergency shutdown calculations
- And a portion of incorrect code (involving $logged_local_filters) has been fixed (action != group)

Change-Id: I091199a9d74aee47dcb3d8942394a28e0ffd3234
2013-01-07 14:42:51 +01:00
CSteipp 452b918203 Merge "Add hooks to AF that allow altering User and Title specific vars" 2013-01-03 20:38:59 +00:00
techman224 192f2e250e Hidden the test subpage in the navlinks for those without modify rights
The link should not be shown to users that don't have the right to use it,
like with the tools and import pages

Change-Id: Ie48e61a7de61ab095d621845466aea56b7445f5a
2012-12-30 15:23:36 -06:00
Marius Hoch 9fa6ef5a95 Add hooks to AF that allow altering User and Title specific vars
Added two hooks to the AbuseFilter, one that allows altering of the
variables created for a specific user and one for title specific
variables. This a much cleaner way to add title or user specific
variables than using the current general-purpose hooks.

Change-Id: I7374846346dd220b5d0633c11c134030f98bcf00
2012-12-28 00:40:48 +01:00
Krenair c7a617f24d (bug 43105) Don't send HTML to the IRC feeds
Change-Id: Idcbcf1f194f2fc1bdd10fefab570849a72ed30e7
2012-12-22 19:05:51 +00:00
Hoo man 253812a2f4 Merge "(bug 22548) add boolean user_blocked variable" 2012-12-18 19:09:32 +00:00
Kunal Mehta f97df950d7 Add option to have private filters notify UDP/RC (default: disabled)
Change-Id: I7e54f1da9f01634791316e613e79b2b7740f9760
2012-12-16 17:09:30 +01:00
Kunal Mehta 2b01494cfc (bug 22548) add boolean user_blocked variable
Change-Id: I8b61ce42338596a38e411d6023c8f7ff963641a1
2012-12-14 04:32:37 -06:00
Ori Livneh 90791cb24e Fix class name
Change-Id: If300aad2c3acf4d007e80a11158419c315c800e4
2012-12-13 15:59:54 -08:00
Kunal Mehta 578bc116e0 Don't send private filter hits to IRC/UDP
Change-Id: I433aa0d92f7bf805ea27eaf235909065e4d478a7
2012-12-13 04:29:16 -06:00
jeblad ae2c2f7e67 (Bug 42064) Change getText to getContent in AbuseFilter
Patchset 2: Handle more content types
Patchset 3: Change cover letter
Patchset 4: Make it b/c
Patchset 5: Refactor and use previous audience
Patchset 6: Fixed/ minor changes

Change-Id: Ib1d2f9803bc95bb9efd445e3778126d5c3090a71
2012-11-25 18:09:47 +01:00
Hoo man d2568a7d43 Merge "fix php notices" 2012-11-02 19:57:52 +00:00
Kaldari 6e3c9e4acf Merge "Bug 40672 - Abuse filter: Increase 5% limit to allow filtering for very short posts" 2012-10-25 18:22:52 +00:00
Matthias Mullie 1706ca0832 Bug 40672 - Abuse filter: Increase 5% limit to allow filtering for very short posts
This patchset will make it possible for other extensions to tap into abusefilter with a custom group, and set different tresholds per group.
See https://gerrit.wikimedia.org/r/#/c/29569/

Change-Id: I21d31bdf28e26f3c830652efc08a247db9f7a86c
2012-10-25 20:21:19 +02:00
raymond 7347c5d728 Add existing page/file restrictions
Already shown with the code but without text:
i.e. https://commons.wikimedia.org/w/index.php?title=Special:AbuseFilter/examine/82786829&testfilter=

PS2: Add message documentation

Change-Id: Ibb23bf556e8702dcd592e7a9b0ff3c851f83380c
2012-10-25 18:02:57 +02:00
Siebrand Mazeland 176227e721 Maintenance for AbuseFilter extension.
* Replace deprecated methods.
* Remove no longer needed function fnmatch().
* Remove superfluous newlines.
* Remove unused and redundant local variables and globals.
* Deglobalization.
* Update documentation.
* Fix incorrect return values or add FIXMEs when in doubt.
* Escape output in a few places where needed.
* Remove unneeded MEDIAWIKI constant checks.
* Fix various JSHint/JSLint issues.

Patch Set 11: Merged https://gerrit.wikimedia.org/r/24701 into
this one per Siebrand's request

Change-Id: I02ba4ce31b6aca5b7324114093f8ece143abc295
2012-10-09 22:26:45 +02:00
Matthias Mullie 457c38cc3a fix php notices
Change-Id: I44ec2181ac7f2aea775f17c162838d52524084f8
2012-09-27 12:15:22 +02:00
Siebrand b7ca16003a Merge "(bug 20272) AbuseFilter does not handle autocreation of accounts." 2012-09-23 18:21:26 +00:00
Krenair 4804699e70 (bug 30324#c9) Remove 'autoblock' log params for blocks
Change-Id: I86bd5fa949a06eed95708d7f1948b684251788bd
2012-09-21 16:26:02 +01:00
Werdna d34b3659d9 Merge "(bug 30324) Don't falsely claim to angry-autoblock in log entries, don't stop talk page access." 2012-09-16 13:14:15 +00:00
Krenair c3bd782ce5 (bug 30324) Don't falsely claim to angry-autoblock in log entries, don't stop talk page access.
Also autoblock.

Change-Id: I0563944752f2c5b536b6d05d74c0814183afe9de
2012-09-09 14:12:13 +01:00
raymond dabc66a883 Replace non standard 'tt' with 'code' for better HTML5 conformity
See http://www.w3.org/wiki/HTML/Elements/tt

Change-Id: Ia2ffb09c002bc3aededfb6bcb8a430da32b52cde
2012-09-07 10:50:13 +02:00
csteipp 1973ea6714 Add Global Rules
* Update rules list view to show global rules toggle, global rules
* Update rule processing to get global rules from memcache, if no
rule exists, get them from the central database and store them in
memcache
* Delete global rule key whenever global rules are updated
* Add filtering for log by wiki on the central database, updated
table definitions to add index on afl_wiki
* Add global $wgAbuseFilterDisallowGlobalLocalBlocks so local wikis
can prevent global rules from locally blocking, removing or revoking
permissions.

* patchset 13: Include recommendations from Tim. Add db updates to
LoadExtensionSchemaUpdates hook.
* patchset 14: forgot to add new files

Change-Id: Id69a9d603f9679f838e8691c651a3e9d8461b422
2012-08-27 03:30:07 +00:00
csteipp 56ca593a71 Add global throttling to AbuseFilter
Adds/checks keys to central memcache instance on throttle actions
to allow for global throttling of events.

Change-Id: Ic4ace6c4aa07990671fe75fbbc1b019a8395fc46
2012-08-16 16:01:19 -07:00
Reedy 268f976a12 Warning: Invalid argument supplied for foreach() in /usr/local/apache/common-local/php-1.20wmf8/extensions/AbuseFilter/AbuseFilter.class.php on line 1852
Change-Id: I9a00f341be161a8b33ff7a482a4f32f5b98b8716
2012-07-24 17:59:50 +00:00
Andrew Garrett 31dba52a94 AbuseFilter: Fix bug in 53aea9c where two log entries would be produced, one of them broken.
Change-Id: I075dce25756683ab4c04edab5f43ba451376ff6d
2012-07-24 10:55:58 -07:00
Reedy fad1fe4c41 Call to a member function getVars() on a non-object in SpecialAbuseLog.php on line 284
Seen on wmf fatal log

Change-Id: I50eb4f9d1b19c8c39ede07e1149baf475cccaaaf
2012-07-24 14:50:01 +01:00
Andrew Garrett 53aea9c0ce AbuseFilter: Resolve bug 18374, bug 28633.
* Store the revision ID associated with a log entry
 if the action is successful.
* Expose this as a diff link in the UI.
* Implicitly hide log entries if their
 corresponding revisions are also hidden.
* Includes scope for expanding to log entries if desired.

Change-Id: Ie2d43dd1bacf14289fdf0492bb22267590ee649d
2012-07-11 10:16:59 -04:00
Reedy 3da992692c Add a few bits of method documentation
De-indent a line

Tidy up method returns

Change-Id: I7aa93072c80a16eb27b7f7ac3d2f030ea63ebf60
2012-06-21 14:32:05 +01:00
Catrope c2869a28fd Merge "Abuse Filter: Allow filters to be split into "groups" for the purposes of operating them on different types of input." 2012-05-14 18:47:12 +00:00
Andrew Garrett dc207d0cbd Abuse Filter: Allow filters to be split into "groups" for the purposes of operating them on different types of input.
The purpose of this change is to allow AFTv5 developers to run a separate list of filters against article feedback actions without issues of cross-contamination and bumping up against the condition limit.

Change-Id: I758795f01eaf3ff56c5720d660cd989ef95764a7
2012-05-12 12:53:32 +10:00
Szymon Świerkosz 36257344f1 (bug 20272) AbuseFilter does not handle autocreation of accounts.
This change depends on I92f57fc2c3189c42157478de14a8d48045a253b5.

This change provides a handler for AbortAutoAccount hook and adds new
action to the filter: autocreateaccount. Every time the AbortAutoAccount
is invoked the filter is executed. This may create some issues with
users which are affected by a filter, because it may be triggered on
every page view. The AbuseFilter relies on CentralAuth session
blacklisting - for each session the filter will be triggered only
once and then the autocreationg of account will not be attempted.

I don't know why AbortNewAccount hook takes as $message argument
a text of message, however AbortAutoAccount takes a name of the
message. This makes impossible to produce a user friendly message
why account creation is not allowed.

Change-Id: Ie3a7ee9210fd884d214ad3132a502a00332c3138
2012-05-10 10:08:48 +02:00
Szymon Świerkosz fb01065583 Replace a deprecated wfGetIP() call with $wgRequest->getIP()
Change-Id: Iad77e7e352afb0d7e065769048ed1d1da25cf867
2012-05-08 09:50:11 +02:00
Szymon Świerkosz 93b7990fa3 (bug 18080) Send filter hits and changes to irc.wikimedia.org.
I have introduced a new option $wgAbuseFilterNotifications which
allows to configure the extension to send hit notifications to
Special:RecentChanges or UDP. It uses ManualLogEntry class:
ManualLogEntry->publish( 0, $wgAbuseFilterNotifications )

Log entries are _not_ accessible using Special:Log, that's bug 19494.

Change-Id: Ie4bda2f97aa295c0504ba869ef1a99c7a3d20f70
2012-05-04 16:45:19 +02:00
Sam Reed 8417c901f7 Few more types top flesh out the previous revisions
Change-Id: I1215dcf92f1b64e744c9ab41e0c5c046114dd48c
2012-03-26 16:03:23 +02:00
Sam Reed 69e582dc17 More documentation stubs
Fix Html::inputLabel to Xml::inputLabel

Fix up some deprecated code

Change-Id: If6503b1794d89666206802591094949e5d715ac1
2012-03-26 16:03:23 +02:00
Sam Reed bea9cb0874 A LOT of function level documentation
Change-Id: I8b591be3c2da7cfb29d3be026772816d14037d37
2012-03-26 16:03:22 +02:00
Roan Kattouw 6c4bd57043 Revert r111217 (unreviewed rev in AbuseFilter) and its dependencies r113585, r113587, r113588, r113589.
All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-21 19:41:11 +00:00
Sam Reed 06e4721b80 Few more types top flesh out the previous revisions 2012-03-11 21:01:29 +00:00
Sam Reed 05a9d4d061 More documentation stubs
Fix Html::inputLabel to Xml::inputLabel

Fix up some deprecated code
2012-03-11 20:51:54 +00:00
Sam Reed 0c99b2bc15 A LOT of function level documentation 2012-03-11 20:40:04 +00:00
Sam Reed 857ae7c546 Bug 35156 - Harmonise spelling of getArticleID() and getArticleId()
Mass change ->getArticleId() to ->getArticleID()
2012-03-11 19:04:37 +00:00
Chad Horohoe 96e4807e08 Actually fix whitespace from r111202, only 83 characters => no need for silly indentation 2012-03-02 22:02:40 +00:00
Andrew Garrett 452ed4ed64 Armour page titles in MD5 when putting information about AbuseFilter warnings in the session. Resolves bug 26635. 2012-02-10 23:45:04 +00:00
Andrew Garrett 5e4289ce4e AbuseFilter: Resolve bugs 18374, 28633.
* Store the revision ID associated with a log entry if the action is successful.
* Expose this as a diff link in the UI.
* Implicitly hide log entries if their corresponding revisions are also hidden.
* Includes scope for expanding to log entries if desired.
2012-02-10 23:41:05 +00:00
Andrew Garrett 9aa60b4ace Fix whitespace 2012-02-10 21:36:31 +00:00
Andrew Garrett fb41b28dbf Revert formatting changes in r111131 2012-02-10 18:20:41 +00:00