Commit graph

6329 commits

Author SHA1 Message Date
Translation updater bot fa0fb1e84b Localisation updates from https://translatewiki.net.
Change-Id: I9fa983c28a3ea7b3098a84328c239bdbcc67bb7e
2021-02-18 08:42:07 +01:00
Translation updater bot eeb90040a9 Localisation updates from https://translatewiki.net.
Change-Id: I4fd12b0457d3409a20ee216f96f197e0bc4c1ad1
2021-02-17 08:41:36 +01:00
Translation updater bot 552dd86729 Localisation updates from https://translatewiki.net.
Change-Id: Ic8345610534de54a67b2688f9aba68e662b82ab9
2021-02-16 08:28:56 +01:00
Translation updater bot ec9cd9a7e0 Localisation updates from https://translatewiki.net.
Change-Id: I187e09baa3bec5cd150dc4fea063627c58374b3d
2021-02-15 10:03:28 +01:00
Daimona Eaytoy e64049c30b Create dedicated types of parser exceptions
Introduce a clear distinction between internal exceptions and
user-visible exceptions, leaving AFPException as base abstract class.

Later, it should be possible to narrow some types around, e.g. in
ParserStatus (that might work with user-visible exceptions only).

Also a future TODO is putting all the exceptions in their own namespace
(probably ...\Parser\Exception).

Change-Id: I4e33a45117f0a3e73af03cc1e3f2734beaf2b5e1
2021-02-12 13:56:02 +00:00
Matěj Suchánek c18e4a4a5f Do not serialize RunnerData to array in FilterRunner
Change-Id: Ia803042224959e516bc14bdc034421b8e80390a8
2021-02-12 14:03:50 +01:00
jenkins-bot 431226ac39 Merge "Serialize all data for edit stash" 2021-02-12 13:01:10 +00:00
Translation updater bot 8f19ca5a87 Localisation updates from https://translatewiki.net.
Change-Id: I2b21158f8d11a375bca0eb31d322a0f5a33b9c60
2021-02-12 08:50:36 +01:00
jenkins-bot 3d7da7aa29 Merge "Check response code and prevent exception in worker-abusefilter" 2021-02-12 00:59:50 +00:00
Daimona Eaytoy 607be2d5bb Check response code and prevent exception in worker-abusefilter
Bug: T274401
Change-Id: I53be8e91c8d4e85df8062504de19929994f56f15
2021-02-12 00:01:51 +00:00
Reedy e197161c79 Use updated CheckUser Hooks class
Depends-On: I3f66b660f9d59c0e88b182c9b06ee8cec994348e
Change-Id: Ia488ce647c5dbd0ab83d2782e76d8c6a35f53bfb
2021-02-11 19:27:06 +00:00
Matěj Suchánek a51b9bf903 Serialize all data for edit stash
Thanks to this, we will be able to provide more information
to consequences and watchers, which will open door for new
features and possibly cleaner code.

Change-Id: I7135509823ea84b2a2923d2c1831ce293b98a9f9
2021-02-11 15:09:50 +01:00
Translation updater bot 4dc5e493df Localisation updates from https://translatewiki.net.
Change-Id: I273f29bf86908d3fe18602848d89a4240fa60d02
2021-02-11 08:37:11 +01:00
jenkins-bot 64cf6e2e7a Merge "Allow testing Flow edits" 2021-02-10 16:56:08 +00:00
Daimona Eaytoy 4067f54351 Allow testing Flow edits
Bug: T115128
Depends-On: Ia736596d0e65904b62233e7625868c9988ffa9ff
Change-Id: Ifc014f190298bfcb17f3e9b6c2f630e027cb4116
2021-02-10 15:04:00 +00:00
Translation updater bot 13b7f2577c Localisation updates from https://translatewiki.net.
Change-Id: Id8e0260d52010a9745f3f5cd6a3531197f092375
2021-02-10 08:37:25 +01:00
Translation updater bot 24852ecd45 Localisation updates from https://translatewiki.net.
Change-Id: I9301361b4bc9def1fd56811f19683bd88cca08f6
2021-02-09 08:38:34 +01:00
Matěj Suchánek 2b3af752ef Get rid of hitCondLimit parameter and field
As the todo says, move the check to the callers.

Change-Id: I5c5fbf772ca57758c901a1ae8068a0f119b4f26f
2021-02-08 15:48:59 +00:00
jenkins-bot 57671efea3 Merge "Create RunnerData class to store data about filter runtime and results" 2021-02-08 15:35:10 +00:00
Matěj Suchánek 1a0a702641 Create RunnerData class to store data about filter runtime and results
Get rid of the $profilingData property.

Change-Id: I608e7b9bcf9e91d9afaadfb8cd191e60d47f9db7
2021-02-08 16:06:25 +01:00
jenkins-bot 4737e038f9 Merge "Separate loose and backwards compatible code" 2021-02-08 13:25:22 +00:00
jenkins-bot c6797f502e Merge "Make FilterRunner::checkFilter return ParserStatus" 2021-02-08 11:40:16 +00:00
Matěj Suchánek 0eff5a3fa0 Separate loose and backwards compatible code
Small refactoring. Create checkAllFiltersInternal and process
its return value in checkAllFilters to ensure compatibility.

Also fix some annotations.

Change-Id: If9d296de48f08d719f1700f88870002b814c5b31
2021-02-08 11:18:53 +01:00
Translation updater bot 39b547d2c8 Localisation updates from https://translatewiki.net.
Change-Id: I2d0d20a9db37f347f854825622d458df80997ec7
2021-02-08 08:36:38 +01:00
Umherirrender 4714a4ed80 Rework time handling in AbuseFilterConsequencesTest::testStashedEdit
Avoid strtotime and compare TS_MW timestamps
Set a fake time to get the same block expiry for relative times

Bug: T272236
Depends-On: I1357d3a78538b8bcb2a3507d86f35371e3f26d47
Change-Id: I5447953c5a0d7ecf4534f4ac4bc2260fa9f42117
2021-02-07 14:27:17 +01:00
Matěj Suchánek 865b7023e4 Make FilterRunner::checkFilter return ParserStatus
This is a small refactoring. The method is protected,
so we only take care of compatibility of ::checkAllFilters.

This might be also be useful if we decide to work on T174554.

Change-Id: I83cd58ec325972264e86d7a73366c0affed0a37e
2021-02-07 12:28:45 +01:00
jenkins-bot a7b24b1dee Merge "Clean up EditStashCache and test" 2021-02-07 01:32:26 +00:00
Daimona Eaytoy a5d79f426c Clean up EditStashCache and test
Change-Id: I952b7bb32d8697c89988f4e0eda8d3177cb30972
2021-02-06 23:16:32 +00:00
jenkins-bot 27c0130d53 Merge "Skip regexp validation if the regex is (partly) unknown" 2021-02-06 21:50:35 +00:00
jenkins-bot d7204eaf73 Merge "Use a different message prefix for parser warnings" 2021-02-06 19:19:19 +00:00
jenkins-bot 3ea76b04ef Merge "Move all "secondary" hooks away from AbuseFilterHooks" 2021-02-06 18:46:01 +00:00
Daimona Eaytoy 4dbde4dcf0 Use a different message prefix for parser warnings
The abusefilter-warning prefix is reserved for filter warnings. Pointed
out by Matěj.

Change-Id: I169e4c3d29b08c7f5af2136a683fc4427f8e93f5
2021-02-06 15:42:33 +00:00
jenkins-bot 2de19b61d2 Merge "Introduce EditStashCache" 2021-02-06 15:36:52 +00:00
Matěj Suchánek 6bb44fd088 Introduce EditStashCache
This class is responsible for interaction with edit stash.

Bug: T271520
Change-Id: I7cc32de0494e76cd9ba12220235c1cdb6b1d5ee1
2021-02-06 12:43:34 +01:00
jenkins-bot c81f791804 Merge "Add a hook to allow computing variables from different types of RC rows" 2021-02-05 16:43:48 +00:00
Daimona Eaytoy 1893120748 Fix doc of AbuseFilterParser::evaluateExpression
It was changed to use AFPData::toNative, so it no longer returns a
string. Instead, it can return any PHP native type.

Change-Id: I92eba03a5fa1149860634a97318b5b15807eb5a5
2021-02-05 16:23:37 +01:00
jenkins-bot 707450c01c Merge "Add debug logging for edits presumably prevented by other extensions" 2021-02-05 11:20:29 +00:00
Translation updater bot b30f555015 Localisation updates from https://translatewiki.net.
Change-Id: Ie5108fc995a131942ae78d7c33da014992d1c995
2021-02-05 08:46:17 +01:00
jenkins-bot a94b2247f6 Merge "Cover some API modules by tests" 2021-02-04 23:43:02 +00:00
Daimona Eaytoy 634742324e Add debug logging for edits presumably prevented by other extensions
Bug: T211680
Change-Id: I0c9ac09044122521f67ffaf38a92e42b20f3ea43
2021-02-04 23:18:49 +00:00
jenkins-bot 07612675f4 Merge "Use Authority in TextExtractor" 2021-02-04 17:53:52 +00:00
jenkins-bot 38772b193d Merge "Partial integration of EditBoxBuilder with HTMLForm" 2021-02-04 17:41:29 +00:00
jenkins-bot 0de3ba31d9 Merge "Fix JS emptying warn/disallow message if filter group is changed" 2021-02-04 15:44:00 +00:00
jenkins-bot 69190af17a Merge "Mixed improvements for AbuseFilter pages and forms" 2021-02-04 15:25:53 +00:00
Daimona Eaytoy 28bd23f38d Skip regexp validation if the regex is (partly) unknown
Bug: T273809
Change-Id: Ib8ab29ad69088baf5b826d9cdada0ded29a58871
2021-02-04 15:16:22 +00:00
Matěj Suchánek a0fcfbcc32 Cover some API modules by tests
Change-Id: Icc57e260b3b06a58fc05f304d6e63dc40f970fe9
2021-02-04 15:17:00 +01:00
Translation updater bot 8c9f35146d Localisation updates from https://translatewiki.net.
Change-Id: I0edce48274f891744e87331bf9ebac5e6eb59a1a
2021-02-04 08:38:26 +01:00
Translation updater bot f49719c0f4 Localisation updates from https://translatewiki.net.
Change-Id: I439da8301fc7ee3217f20cdfaadef35065d2b8e9
2021-02-03 08:38:23 +01:00
Translation updater bot c3867cfae6 Localisation updates from https://translatewiki.net.
Change-Id: I972635fa9f0bac82946d7fc195c55d0b746ca5a2
2021-02-02 08:37:52 +01:00
Daimona Eaytoy b0058c0f1b Use Authority in TextExtractor
And make its test a pure unit test, as per TODO comment.

Change-Id: Ia3ca38702ea61c5e551a581248d2b9471ef881fb
2021-02-02 00:43:01 +00:00