Commit graph

7606 commits

Author SHA1 Message Date
Kosta Harlan f948c79066
Provide integration with ConfirmEdit to show CAPTCHA
Why:

- We want AbuseFilter to able to require a CAPTCHA if an action
  matches conditions in an AbuseFilter

What:

- Implement the ConfirmEditTriggersCaptcha hook, and check to see if
  the CaptchaConsequence set a global flag that indicates if we
  should show a CAPTCHA

Depends-On: Ie87e3d850541c7dc44aaeb6b30489a32a0c8cc60
Bug: T20110
Change-Id: I110a5f5321649dcf85993a0c209ab70b9886057c
2024-05-10 21:00:47 +02:00
Kosta Harlan aae35c848a
build: Add quibble.yaml and enable early warning bot feedback
Why:

- Save developer time by reporting build failures as soon as they occur,
  rather than after all test jobs for a patch report back. E.g. Selenium
  takes 15 minutes to run, while the node test has its results back
  within 60 seconds; it's nice to know as soon as node fails.

What:

- Add quibble.yaml which Quibble analyzes as part of its CI job
  execution, `should_comment` instructs the Early Warning Bot to comment
  on the patch if a test build fails.

Bug: T323750
Change-Id: I56adb549f4df2146c3ad6e6440198b94e708bb25
2024-05-10 14:25:14 +02:00
Translation updater bot 50766781ac Localisation updates from https://translatewiki.net.
Change-Id: I2a977cb0775e89271c0a44c213d8603459ae305f
2024-05-10 09:27:16 +02:00
Translation updater bot 1d20a59f84 Localisation updates from https://translatewiki.net.
Change-Id: Iae605ac3436a08d4e1e6a2abd94d4a3c8eea59e2
2024-05-09 09:36:37 +02:00
Matěj Suchánek f9dcf46d70 Replace most Xml methods with Html
Xml::buildForm and Xml::fieldset are left.

Change-Id: Iff88869fd002165ec9ee80897d4deb585005b9d1
2024-05-08 13:08:52 +02:00
Translation updater bot 25c48d1384 Localisation updates from https://translatewiki.net.
Change-Id: Ica9c34d7a3e3165fe3704a0554497a790187f3e0
2024-05-08 09:23:04 +02:00
jenkins-bot da6c581031 Merge "Fix path of CodeEditor modules" 2024-05-07 20:38:14 +00:00
jenkins-bot e9ce073889 Merge "build: Updating grunt-banana-checker to 0.12.0" 2024-05-07 17:35:01 +00:00
Translation updater bot e777f6b199 Localisation updates from https://translatewiki.net.
Change-Id: Ib839f61caadac79856b2032ca309344252803bd3
2024-05-07 09:21:44 +02:00
Translation updater bot ca38ecb5c7 Localisation updates from https://translatewiki.net.
Change-Id: Idfeeed9e1daa247327aafcbc6205eedb3bd082e5
2024-05-06 09:24:42 +02:00
libraryupgrader 294609ef25 build: Updating grunt-banana-checker to 0.12.0
Change-Id: I3aafde159cbf50bad1b640027d00354dc90feadb
2024-05-06 05:12:04 +00:00
jenkins-bot 099b02bfb0 Merge "phan: Update config to load ConfirmEdit" 2024-05-05 09:39:43 +00:00
Kosta Harlan b8b3ef02c7
phan: Update config to load ConfirmEdit
Depends-On: Ica4c83d367f8569139188c5029ebc612f78056c0
Change-Id: I0a67d4209f47872926806a98ae1280eefc06c4c5
2024-05-05 11:02:07 +03:00
Amir E. Aharoni b7dfe1a628 Remove full stops from two messages
Full stops are not used in other similar messages.

Change-Id: I98cc6c1c3fd1c4b888dcff5768f4af3c07ee4cfb
2024-05-05 00:49:38 +03:00
Alexander Vorwerk fd0e23e2fa Update minus-x to 1.1.3
this repo is a libup canary

Change-Id: Ic89fd967fae36eb252a7635f209bbe30de0467e4
2024-05-04 16:34:08 +00:00
jenkins-bot 45499268ab Merge "Automatically add operators to description messages" 2024-05-04 14:09:32 +00:00
xtex bc6240fbda
Replace some deprecated functions
Change-Id: I4070a3655f2fac1d7afe1c3a244a64cb55019b9a
2024-05-04 21:32:04 +08:00
Amir E. Aharoni 1904cf8d1b Automatically add operators to description messages
This solves two issues described in bug T360909:
* Usage of unsafe characters that have to be
  manually reviewed in translations.
* Incorect display of some functions and
  operators in RTL UI languages.

It also reduces the translators' need to copy
those operators and functions, which are always
identical to English.

Finally, this patch adds those consistently to all
the messages. Some messages didn't mention them
for an unspecified reason, and now they are mentioned
everywhere.

Bug: T360909
Change-Id: I3283c91b6b1d5fe9b48b1477cd454d9def3a7ded
2024-05-04 07:08:33 +00:00
jenkins-bot afe8d8224c Merge "Remove custom API error code and data for blocked domains" 2024-05-03 17:04:55 +00:00
jenkins-bot f46a5bdff6 Merge "Fix Status combining MessageSpecifier and parameters array" 2024-05-03 16:20:24 +00:00
Bartosz Dziewoński c859f1b526 Remove custom API error code and data for blocked domains
A custom API error code and data similar to those used when an edit is
blocked by a normal AbuseFilter filter were accidentally added when
the feature was introduced. They should not be there, as the blocked
domains feature is not a normal AbuseFilter filter.

Hopefully nobody is relying on the format of this API response yet.

This commit changes the action=edit response for this case from:
{
  "error": {
    "code": "abusefilter-disallowed",
    "info": "The text you wanted to publish was blocked by our filter. The following domain is blocked from being added: example.edu",
    "abusefilter": {
      "id": "blockeddomain",
      "description": "blockeddomain",
      "actions": "disallow"
    }
  }
}
to:
{
  "error": {
    "code": "abusefilter-blocked-domains-attempted",
    "info": "The text you wanted to publish was blocked by our filter. The following domain is blocked from being added: example.edu"
  }
}

Change-Id: I61ccc8f44b63e5cd0f11b1fe9a00ff60104a6249
2024-05-03 16:58:37 +02:00
jenkins-bot a464cb7453 Merge "Simplify computation of derived links variables" 2024-05-03 07:22:40 +00:00
jenkins-bot eb1db27c77 Merge "Clean up ActionVariablesIntegrationTest" 2024-05-03 07:16:12 +00:00
Umherirrender 06ccd0c0b8 tests: Use IDatabase for mocking instead of DBConnRef
DBConnRef is internal, use of IDatabase interface is more common

Change-Id: Ib14496dd4e5c02bb80a1e7f43e9489d5c22bda39
2024-05-02 22:32:05 +02:00
jenkins-bot 9da1bf7dff Merge "Migrate to IReadableDatabase::newSelectQueryBuilder" 2024-05-02 20:13:30 +00:00
Translation updater bot 6d65e63add Localisation updates from https://translatewiki.net.
Change-Id: If38116bdc29cf67b9aba17e63bd2f3219360d1cb
2024-05-02 09:18:44 +02:00
libraryupgrader d8da059e83 build: Updating ejs to 3.1.10
* https://github.com/advisories/GHSA-ghr5-ch3p-vcr6

Change-Id: I064c94773b95a596dae4b5ef1659ecf88e5000f5
2024-05-02 01:04:27 +00:00
Suffusion of Yellow e4eb65524c Fix path of CodeEditor modules
This was changed to /CodeEditor/modules/lib/ace in 46ee5c493
and is breaking CTRL-F search and other features.

Bug: T362813
Change-Id: Ie1e2a5dc32a7f5c6275a64651e5230ad801d5455
2024-05-01 12:48:25 -07:00
Matěj Suchánek 7f3ded3004 Clean up ActionVariablesIntegrationTest
Change-Id: Ia9ad89b699dac351e6b14a3d33dc0ceea7ed74b3
2024-05-01 16:22:15 +02:00
Translation updater bot 9cd74c0bd4 Localisation updates from https://translatewiki.net.
Change-Id: Ib988462369aab0e411623f408d8ffb49244b949c
2024-05-01 09:21:34 +02:00
Umherirrender 6dccb17255 Migrate to IReadableDatabase::newSelectQueryBuilder
Also use expression builder to avoid raw sql

Bug: T312420
Change-Id: I83eb39f1c65a698108ae5bb72f633afda37a9f23
2024-04-30 20:45:51 +02:00
Translation updater bot 84b047f6e4 Localisation updates from https://translatewiki.net.
Change-Id: Ia6ccc1438190e8ec315f5eb3cde7f18de9e8d8d2
2024-04-30 09:20:19 +02:00
Umherirrender d0e85abda1 maintenance: Migrate to IReadableDatabase::newSelectQueryBuilder
Also use expression builder to avoid raw sql

Bug: T312420
Change-Id: I981f7d8107b7c4401056266c58db4457ad759f9c
2024-04-29 22:15:35 +02:00
Translation updater bot ca7c0232d3 Localisation updates from https://translatewiki.net.
Change-Id: Idcec502aa0134afc26950a27c8b1e96024d6b782
2024-04-29 09:22:23 +02:00
Matěj Suchánek 6526a5494b Simplify computation of derived links variables
Instead of having separate methods for each variable,
have one method which can work not only with "_links",
but with any array of strings.

Change-Id: I05f1b1cbd15f283b314c72259f183f7788e4e214
2024-04-27 10:56:58 +02:00
Translation updater bot 2ea686643f Localisation updates from https://translatewiki.net.
Change-Id: I415f042420c35fbdbfbb82ea09b9fd64ec4b57bf
2024-04-26 09:47:12 +02:00
Translation updater bot adc724bb76 Localisation updates from https://translatewiki.net.
Change-Id: Idc58d87d97d31fa5378709a8f791b8e7cf70d4b8
2024-04-25 09:16:58 +02:00
Alexander Vorwerk ce59b52c48 Add afl_var_dump to AbuseLogPager::getQueryInfo
Follow-Up: I08a399f1b6a66442317b151be5386c9d2485f1fb
Bug: T363213
Change-Id: I6cdd59687a7e23d472eb2aa7d5c55714967a77ee
2024-04-23 21:38:23 +02:00
Translation updater bot 1747dcaefd Localisation updates from https://translatewiki.net.
Change-Id: I5b482d2c585a9b5349ac59e5b0c30cd46f47a97f
2024-04-23 09:27:19 +02:00
Translation updater bot 0bd9d40f66 Localisation updates from https://translatewiki.net.
Change-Id: Ifd30d028b4a0d9813bca16704967ab58661af98c
2024-04-22 09:27:11 +02:00
jenkins-bot 0038f18b9b Merge "Migrate to IDatabase::newUpdateQueryBuilder" 2024-04-20 20:40:53 +00:00
Umherirrender 6c870529e4 tests: Return FakeResultWrapper from mocked IReadableDatabase::select
To match the return type documentation of IReadableDatabase::select

Change-Id: I6a03c9468aa23f830f550e83eebf734ba0167c23
2024-04-19 21:20:07 +02:00
Translation updater bot 55f710b3df Localisation updates from https://translatewiki.net.
Change-Id: Iedd04fa4e626d4eb54579c829c06457accaa1e2b
2024-04-19 09:45:11 +02:00
jenkins-bot f48ea8b48a Merge "Replace SELECT * with real list of used fields" 2024-04-18 19:35:55 +00:00
Translation updater bot 293ce4115d Localisation updates from https://translatewiki.net.
Change-Id: I97d530ace146620eaf9eeeac4d53bc15819c1aef
2024-04-18 09:19:36 +02:00
Translation updater bot 31d58fb5cb Localisation updates from https://translatewiki.net.
Change-Id: I9c305d3a9daaf0898ffd0b51cd154376bda25f2c
2024-04-17 09:27:21 +02:00
Timo Tijhof 4743f9d267 tests: Widen @covers tags in phpunit tests
Follows-up I5a5420df13893386.

> We lose useful coverage and waste valuable time on keeping tags
> accurate through refactors (or worse, forget to do so).
>
> Tracking tiny per-method details wastes time in realizing (and
> fixing) when people inevitably don't keep them in sync, and time
> lost in finding uncovered code to write tests to realize it was
> already covered but "not yet claimed".
>
> Given all used methods are de-facto and liberally claimed, and
> that we keep the coverage limited to the subject class, this
> maintains the spirit and intent. PHPUnit offers a more precise
> tool when you need it (i.e. when testing legacy monster classes),
> but for well-written code, the class-wide tag suffices.

Ref https://gerrit.wikimedia.org/r/q/owner:Krinkle+is:merged+message:Widen

Change-Id: If7304d8b5b43ab8a051fbcecced331a787bab960
2024-04-17 01:44:40 +01:00
Umherirrender 0a601acd6f Replace SELECT * with real list of used fields
It is a common pattern to avoid SELECT * and use the fields used by
the application to avoid loading to much data into memory and maybe use
performance benefits when fields are covered by index.

Change-Id: I08a399f1b6a66442317b151be5386c9d2485f1fb
2024-04-16 21:14:10 +02:00
Translation updater bot d654cdf804 Localisation updates from https://translatewiki.net.
Change-Id: I75d4c6fd3e5db58956d44327313bfd9e943214d6
2024-04-16 09:26:41 +02:00
Umherirrender 3691d773d3 Migrate to IDatabase::newUpdateQueryBuilder
Change-Id: I0b3fd864e5227068114ca7aa9e98361046f393c1
2024-04-15 23:07:44 +02:00