Commit graph

1788 commits

Author SHA1 Message Date
Rendann 8ff80d0134 Convert Special:AbuseFilter/import to OOjs
Based on https://gerrit.wikimedia.org/r/#/c/370150/
Bug: T132284

Change-Id: Iab2a24926c6b547e34f516149ff94953fb0da634
2017-08-18 13:35:30 +00:00
jenkins-bot 3318bf1570 Merge "Remove manual implementation of AntiSpoof::equivString" 2017-08-14 23:11:45 +00:00
Dayllan Maza 22a7f6e912 Remove manual implementation of AntiSpoof::equivString
Cleaned ccnorm method to use AntiSpoof::normalizeString instead going
after AntiSpoof extension files and doing a manual implementation of it.
Also removed composer requirement for AntiSpoof extension.

Bug: T172766
Depends-On: I731733671b650b6bb2f480c41c4f6f2d2f5c62e8
Change-Id: Ib38ba0b06918e81e8af03032eef95e3942773bc1
2017-08-14 16:25:25 -04:00
jenkins-bot 391966dec4 Merge "Fix the order of conditions when choosing the correct method" 2017-08-14 20:04:42 +00:00
Rendann 51924f3a92 Convert Special:AbuseLog to OOjs
Bug: T132284
Change-Id: Ifad07bac45eadc4ed377967aa4ab3e3b9e14aa8b
2017-08-14 17:19:28 +02:00
matejsuchanek 3b29498f21 Migrate abusefilter/modify log
Bug: T32553
Change-Id: I7e33d1064329124755c77ffe6efbd5d572f43cb9
2017-08-12 10:00:42 +02:00
Matěj Suchánek 79c25e5583 Improve documentation of methods
Change-Id: I231d6a3e095324ae1509fdf028bcc352148a0dbe
2017-08-11 23:26:29 +00:00
Kunal Mehta 72427ec974 build: Updating mediawiki/mediawiki-codesniffer to 0.11.0
Change-Id: I26adebde9fcb2894804ab705402d05d9de745cb1
2017-08-10 22:57:33 -04:00
jenkins-bot 3e9efb90f7 Merge "Require MediaWiki 1.29" 2017-08-10 18:06:06 +00:00
NoRandom 389995916c Allow searching for visible-only/hidden-only/both on abuselog entries
Bug: T153065
Change-Id: I44ca86ff8564328ae932ccad9675298b686dc6ab
2017-08-10 11:46:57 +02:00
Matěj Suchánek 55c27a8f6b Require MediaWiki 1.29
After I544cdfa75c7472f2d98b2561bc6f6f9c2d2ad639 (dieWithError
and checkUserRightsAny), this is the oldest MediaWiki version
AbuseFilter can be run on.

AbortMove was removed from MediaWiki in 1.25, UploadVerifyFile
is only relevant for 1.27 and older.

(Replaces I1e962217c3b20d901a5742cf76339a3f488a6e97.)

Change-Id: Iec237b2887f72b115fdcef78d2d7a944ba82c784
2017-08-10 11:01:34 +02:00
jenkins-bot 7b67f903e0 Merge "Completely disable Special:AbuseFilter/tools for non-maintaners" 2017-08-09 17:12:35 +00:00
Umherirrender eaa1e9fb25 Improve some parameter docs
Change-Id: I03fa9b58c72bcd28985c5a3467b82d8b98f3a0fc
2017-08-08 15:05:06 +02:00
Matěj Suchánek 020517dbe2 Completely disable Special:AbuseFilter/tools for non-maintaners
As described in the task, anyone can view the page but do nothing
with it. It doesn't make sense, it should either work or be disabled.
I chose the latter.

Bug: T124096
Change-Id: I7271cd5a0d00d5fdba28ce3974c50ea5dfd0ad9b
2017-08-08 10:38:25 +02:00
Max Semenik b67cb42c09 Fix some deprecated function usage
Change-Id: I544cdfa75c7472f2d98b2561bc6f6f9c2d2ad639
2017-08-07 16:35:21 -07:00
Max Semenik de7389e19a Fix class and function name case
Change-Id: I55ed3b26ee457863372ec063b7c3ff27bc849b8b
2017-08-07 16:22:48 -07:00
Max Semenik 7e62f23242 Rm unused locals
Change-Id: Ieb77c089645b858290a15c5804de636c5a7b53cc
2017-08-07 16:19:45 -07:00
Max Semenik a6c87eca7a Get rid of deprecated manual profiling
Change-Id: Iefbfb4b9937ed265156fb1b644889fd9e2b29a2e
2017-08-07 16:14:31 -07:00
Max Semenik 2f250127b4 Normalize file layout
Aka move all code into includes/.

Change-Id: I21f7b80bb6df04abbed6bfccb94f92100dc8f071
2017-08-07 16:11:38 -07:00
Kunal Mehta 3a58875637 build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.WrongStyle

The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment

Change-Id: I0874c547ef2bc8a7c3fa4ca72738aa3320f2bdbe
2017-07-23 00:03:40 -07:00
Matěj Suchánek 014f0adda1 Fix the order of conditions when choosing the correct method
It seems that move actions have rc_this_oldid set. rc_log_type
should have higher priority.

Bug: T170586
Change-Id: I9bb4ea599f12ef01fad823ac3232330966b0d281
2017-07-13 17:31:19 +02:00
Umherirrender 1a58507870 build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
Change-Id: I5f37c45d748d5f0da21aceaef32cc89367e312ff
2017-07-08 20:49:30 +02:00
Matěj Suchánek a1aa09d31c Cache global filter names
AbuseLog fetches the names in an additional query for each line but the
result is always same.

Change-Id: Ie12f909727ae82ab60781ccedfdf1b241c105388
2017-06-17 20:50:18 +02:00
Umherirrender a063e33ee8 Use short array syntax
Done by phpcbf over composer fix

Change-Id: I53fd1fc8d056b9b60194d2d630852cfca37aadea
2017-06-15 17:02:57 +02:00
Umherirrender d4b50be650 Update mediawiki/codesniffer to 0.7.2
Also move --ignore to phpcs.xml for use by phpcbf
Short array syntax will be used in follow ups
to keep this patch set small

Change-Id: Ib91f3768cc7cdccdc26a4d5200178ceb8e61e098
2017-06-13 11:59:10 +02:00
Tim Starling 525b6c064c Fix usage of $db->nextSequenceValue()
The return value from the method is only suitable for passing to
$db->insert(). To get the inserted ID, you need to call $db->insertId()
even if $db->nextSequenceValue() returned non-null.

Change-Id: Id5a0df17c77445e9f29564a55fb850c3ecad2630
2017-05-11 10:03:49 +10:00
jenkins-bot 6b70225281 Merge "Only add 'sysop' group to filter user if not in it" 2017-05-09 16:46:08 +00:00
jenkins-bot 7f02b8f0cc Merge "Remove usage of RequestContext::getStats()" 2017-04-26 20:51:14 +00:00
Florian Schmidt 0c663b50e9 Remove usage of RequestContext::getStats()
Bug: T156810
Change-Id: I795080cf431d396337a1ba6fa42e82ffb1b9c145
2017-04-26 20:38:21 +00:00
Jcrespo 848a9ff6f5 Add FORCE INDEX to AFComputedVariable::{closure}
We add FORCE INDEX to revision because probably we have hit a MariaDB
bug that can potentially create an outage on pages with thousands of
revisions due to extreme resource usage by this query when using the
wrong index page_user_timestamp, instead of page_timestamp.

This is considered to be a hack, and once we are in the clear, I promise
to review this an try to get a saner execution path (both in MySQL and
in PHP.

Bug: T116557
Change-Id: I41853da5c0e1a15efad5594eff0cee62be1ad9a4
2017-04-24 19:34:41 +00:00
Kunal Mehta 1392aa05d6 Only add 'sysop' group to filter user if not in it
This should avoid repeated, unnecessary calls to User::addGroup().

Bug: T163032
Change-Id: I010e6eb45c4fbf984a3b5e5df2671117ca4e0136
2017-04-17 10:34:47 -07:00
Timo Tijhof f95e5dd086 Update getStashKey() to use $cache parameter
Follows-up e4ac1ef. A lot of this class gets its own cache object
in key-generation methods because of legacy compat with public
methods and because of how wfMemcKey used to be.

However where possible, we should encourage passing $cache
so that makeKey() can be used on the same instance that uses
the key.

This is a no-op since it's exactly the same object.

Change-Id: Ib3c31110176659a9175679eb716369e7f0a1d3b2
2017-03-09 14:08:04 -08:00
Matěj Suchánek e4ac1efb7a Remove unused argument from a private method
Change-Id: I2f34bb04a90c2535fbeb0e515714aa4a71779f50
2017-03-02 16:34:23 +00:00
Huji Lee 630ef7f2ce Don't use wfDiff() in AbuseFilter
Bug: T158850
Change-Id: Ib5bd4eacc3dd26dc2abdf4eedce66ed228b326d8
2017-02-28 00:29:33 +00:00
Matěj Suchánek de1c2af0e1 Unify global filters decoding across AbuseFilter
Change-Id: I3c97c24b5d0e4818b36e233a8bb3b205cbb2c7d0
2017-01-02 12:14:02 +00:00
Matěj Suchánek 9379a0c767 Add GENDER to the message logentry-abusefilter-hit
As far as I can see, this parameter is already supported.

Bug: T153607
Change-Id: If3eed341ef2f2e7bbad103c2738a7eae59886faa
2016-12-26 09:32:31 +00:00
Aaron Schulz 2d57141600 Move AbuseFilterVariableHolder up to /includes
This class is not for parsing logic or tree nodes

Change-Id: I07a499cc972c30fc249ec4de3250900a3b703443
2016-12-18 17:13:06 -08:00
Aaron Schulz 9b1021b055 Move various classes to their own files
Change-Id: I5d418b3fa27aa6e04b9a680922e5eab2439ffb20
2016-12-17 11:40:10 -08:00