Commit graph

5196 commits

Author SHA1 Message Date
Translation updater bot 347146ef8a Localisation updates from https://translatewiki.net.
Change-Id: Ib6d909ccb9160f7ecc1c4888325806df023502c8
2019-10-09 09:15:59 +02:00
Max Semenik b3d11b48cb tests: setExpectedException() is deprecated
Bug: T192167
Change-Id: I899a8f03c6cc1f79f58bec09c2d8b2ba10b895d8
2019-10-08 16:31:15 -07:00
Translation updater bot be360b520d Localisation updates from https://translatewiki.net.
Change-Id: I49f60d52fc29c84916ac282ea641de462366dc8f
2019-10-08 09:30:51 +02:00
Translation updater bot 0465d64a5f Localisation updates from https://translatewiki.net.
Change-Id: Ice510a596cdeeac02f4fa075f7341d5b8571396e
2019-10-07 09:07:26 +02:00
jenkins-bot feae26116a Merge "Remove disabled variables deprecation" 2019-10-04 20:07:10 +00:00
jenkins-bot c6ee722273 Merge "Remove AFPData::dup" 2019-10-04 19:42:52 +00:00
jenkins-bot 9ab13cf24b Merge "Replace array_map with foreach" 2019-10-04 19:42:49 +00:00
Daimona Eaytoy c7fa503e9b Remove AFPData::dup
The method, which simply duplicates an AFPData instance, is only used
when casting types, to return a different instance when the object
already has the desired type.
However, nothing is assuming that, so we can just return the original
instance and save some time.

Bug: T234427
Change-Id: Id8067b418a00260ceead35f234e55268390699ab
2019-10-04 19:15:08 +00:00
Željko Filipin 0a95a6572c Selenium: make it possible to run daily Jenkins job targeting beta cluster
Bug: T199113
Change-Id: Idce6d7d014ab5bb0c9602d5f1e5321cd9c0d1615
2019-10-04 16:23:22 +02:00
Daimona Eaytoy 328dbc99c7 Remove disabled variables deprecation
I just realized that the parser is already throwing if it finds a
disabled variable. Hence, all calls to getVar with a disabled var are
from old entries and the like, and we don't care.

Bug: T234048
Change-Id: I39429d286575df91108a4119177a0d3aef181d0b
2019-10-04 15:03:08 +02:00
Translation updater bot 5b8502caa4 Localisation updates from https://translatewiki.net.
Change-Id: I22dac70a8802c17512d7588114faaf761798c5c4
2019-10-04 09:27:03 +02:00
Daimona Eaytoy 703835e835 Drop HHVM support
Change-Id: Ib7ccb4f68278ba8ca009e9d18e9d8b127f799cde
2019-10-03 12:27:18 +00:00
Translation updater bot 3985f979ea Localisation updates from https://translatewiki.net.
Change-Id: I1b24aff7cc326bb1e3276f21d99b617f60b6ef43
2019-10-03 10:02:29 +02:00
Daimona Eaytoy 337771f83b Replace array_map with foreach
This is a micro-optimization, but IMHO it's necessary. The AF parser
code is executed for every active filter, for every
edit/move/deletion/accountcreation. In PHP, foreach is usually faster
than array_map. Especially in the case of variadic functions potentially
taking hundreds of strings, foreach will consume less time.

Bug: T234427
Change-Id: I1beedf419a6637a9a3dd668635645df950ceda21
2019-10-02 11:29:19 +00:00
Translation updater bot 188742a07e Localisation updates from https://translatewiki.net.
Change-Id: Iec3bf5ff81ce46cd56557aa51a61201d7d028f69
2019-10-02 09:17:45 +02:00
Translation updater bot 39194f3ca0 Localisation updates from https://translatewiki.net.
Change-Id: Ie29a92e5958aba71c9f1ba46f7e5b0c9fea20cb1
2019-09-30 09:15:15 +02:00
Krinkle a532874ee2 Update StringUtils::isValidRegex() call to isValidPCRERegex()
This follows-up 8587576655 (AF) and efbfa0a727 (core). The
method was recently introduced within the 1.34 cycle but
renamed following late CR feedback.

Change-Id: I9986deb080791c6266c6c60cc91022266ad9b5e5
2019-09-28 19:12:11 +00:00
jenkins-bot 952dfa0bb4 Merge "Hard-deprecate requesting disabled variables" 2019-09-28 18:25:24 +00:00
Daimona Eaytoy 0ae24d5489 Hard-deprecate requesting disabled variables
This also includes the filter ID. If the filter ID is not available, it
means that the user is using stuff like /tools, and they'll immediately
see the error.

Bug: T234048
Change-Id: I44a37d98c80df910b0c466fbd464e69042770c0c
2019-09-28 17:57:02 +00:00
jenkins-bot 0e30c1c34e Merge "Add new schemas for splitting afl_filter" 2019-09-27 15:41:06 +00:00
Translation updater bot 8ba9251761 Localisation updates from https://translatewiki.net.
Change-Id: I9298ac154cb12174f15345fff49e8a73ecf92808
2019-09-26 09:11:55 +02:00
Translation updater bot 097fdd2af4 Localisation updates from https://translatewiki.net.
Change-Id: I662b9a984d10b356dbc4eb5afdf895f8e44d4a59
2019-09-25 09:21:39 +02:00
jenkins-bot eb91e1cb41 Merge "Fix params to ParserOutputStashForEdit" 2019-09-24 09:31:34 +00:00
Translation updater bot 1e538e0225 Localisation updates from https://translatewiki.net.
Change-Id: I445eb837dabe772b84738c62c1478d50c22ac27a
2019-09-24 09:54:01 +02:00
Daimona Eaytoy 0119108ee7 Fix params to ParserOutputStashForEdit
$summary and $user are always guaranteed to be passed, and $user is
guaranteed to be a User object. Hence, update the hook handler to
reflect that.

Change-Id: I3a7fcb074b460b77210de5a6bad43f500aff3249
2019-09-23 23:33:51 +02:00
Translation updater bot 8dbbe859e7 Localisation updates from https://translatewiki.net.
Change-Id: I5afd496088aa23f026e5bc08a642a7f3ae18546e
2019-09-23 09:22:33 +02:00
Daimona Eaytoy 9a6dd1307c Add new schemas for splitting afl_filter
It'd be great if we could get this included in 1.34.

Bug: T220791
Change-Id: I62d429d0eb6a7adc51cc37fe18f878077f85a006
2019-09-22 16:04:45 +00:00
TheSandDoctor 4a933e034f ext.abuseFilter.tools.js: Replace deprecated editToken with csrfToken
The editToken key of mw.users.tokens is deprecated since MediaWiki 1.27.
This commit resolves it for AbuseFilter.

Bug: T233442
Change-Id: I445313088cef40caf0d0695a64515cd16e83504d
2019-09-22 01:54:34 +00:00
Translation updater bot 0f4c126497 Localisation updates from https://translatewiki.net.
Change-Id: I668292bef50131d591aa7b2a8b3605261878aa3d
2019-09-20 11:40:10 +02:00
Daimona Eaytoy e2570a4c2b Actually provide a StatsdDataFactory to the parser
Follows-up Ib934be34a953166fe1b94cfe8ed216afe3b906ca

Bug: T156095
Change-Id: Ia8df84cf7c43071f304ce729b811dfd5aa96b951
2019-09-19 19:06:14 +02:00
Daimona Eaytoy e7926114ff SECURITY: Avoid info leak in SpecialAbuseLog
Deleted/suppressed usernames and summaries leak through AbuseLog.
Temporarily hide all non-public revision from AbuseLog, until we can
properly fix the issue.

Bug: T224203
Change-Id: If3d3256404d0f3dbde171831937d1a816b3e2734
2019-09-19 17:46:12 +02:00
jenkins-bot 4eb56d162c Merge "Localisation updates from https://translatewiki.net." 2019-09-19 08:04:10 +00:00
jenkins-bot 9c786ca776 Merge "Use StringUtils::isValidRegex" 2019-09-19 08:03:39 +00:00
Translation updater bot 7fd6707c9b Localisation updates from https://translatewiki.net.
Change-Id: Idcd02ce986815175f59ea58380de856fd87068ed
2019-09-19 09:53:26 +02:00
jenkins-bot 58fc7a93d1 Merge "Add profiling points throughout the code for the CachingParser switch" 2019-09-18 17:56:49 +00:00
Daimona Eaytoy 4c8be4d374 Add profiling points throughout the code for the CachingParser switch
Bug: T156095
Change-Id: Ib934be34a953166fe1b94cfe8ed216afe3b906ca
2019-09-18 10:02:55 +00:00
Daimona Eaytoy 0646b4fe7d Add config for Selenium and basic tests
This is some sort of Hello World for selenium. This patch adds the
config files and a couple of very basic tests.

Bug: T214478
Change-Id: I8193b4edb40332bea1d08e24ec020bf36004320d
2019-09-17 16:23:07 +00:00
Translation updater bot 27a0fe8e79 Localisation updates from https://translatewiki.net.
Change-Id: I63efceaf5b72390e479b7c66bc08e425712afe5b
2019-09-17 09:04:34 +02:00
jenkins-bot f8c72d3b30 Merge "Show link to test filter to all users who can use it" 2019-09-16 10:30:09 +00:00
Translation updater bot 95f4ed5bd7 Localisation updates from https://translatewiki.net.
Change-Id: Ibba31880b0ab9476bcc308ad947c101627741027
2019-09-16 09:53:14 +02:00
DannyS712 6699237b86 Show link to test filter to all users who can use it
Bug: T232962
Change-Id: I67357975a7064991e47c60b70c487d12bdf6b7b4
2019-09-15 22:03:56 +00:00
jenkins-bot 8f4711c8ca Merge "Prevent blocked users from using /revert" 2019-09-15 12:07:43 +00:00
jenkins-bot 7add89b252 Merge "Don't show the form for restoring autopromotion to unprivileged users" 2019-09-15 11:26:19 +00:00
Daimona Eaytoy 127fd4ac3c Prevent blocked users from using /revert
Bug: T232916
Change-Id: I67e464f3182e74129186f7e803d05105a0f2ec23
2019-09-15 11:21:18 +00:00
jenkins-bot 48713c824b Merge "Throw AFPUserVisibleExceptions for empty operands in CachingParser" 2019-09-15 08:36:39 +00:00
Daimona Eaytoy a4e25c1ac9 Throw AFPUserVisibleExceptions for empty operands in CachingParser
Instead of TypeErrors. Basically, only empty parenthesis had to be
fixed.

Bug: T156096
Change-Id: I019615c7bfaa179c2184b5d3ea2c6b5da91366e3
2019-09-14 18:35:40 +00:00
Daimona Eaytoy 5267082c85 Better logging for unset variables
We have many log entries, so we need some more debug data.

Bug: T230256
Change-Id: I0e9638c1ffe537ea6cfd6886ff32ef447fdacc28
2019-09-14 16:49:55 +00:00
Daimona Eaytoy fe395bd96b Use dieBlocked instead of directly using apierror-blocked
This allows us to:
 - Defer handling of the block to the main module
 - Choose the right message depending on the block type
 - Avoid directly using the apierror-blocked message, which could change
 in the future.

Change-Id: If2e32bd2ccf5e314aa51203afd1522b8481377e0
Follows-up: I35f2c6e701a24dccb6e26e3f3c578fd44f68127d
2019-09-14 10:18:01 +02:00
jenkins-bot f8ee9fb959 Merge "Prohibit sitewide blocked users from restoring autopromotion" 2019-09-14 02:59:41 +00:00
jenkins-bot 45d7bd5971 Merge "CachingParser: ensure to catch errors inside short-circuited blocks" 2019-09-14 01:56:35 +00:00