Commit graph

8875 commits

Author SHA1 Message Date
Translation updater bot
b7432b90c0
Localisation updates from https://translatewiki.net.
Change-Id: I8263419b865039c2a45179ad5a48d3185b6c71e6
2025-05-13 07:34:39 +02:00
Translation updater bot
5049b1c0d7
Localisation updates from https://translatewiki.net.
Change-Id: I2600f9164717118fac11811f84ad8390bbb9f7ce
2025-05-06 07:33:48 +02:00
Translation updater bot
03d78bbd83
Localisation updates from https://translatewiki.net.
Change-Id: Ib6aba4756c1db49e5e8a4b626eed2b4af06c3231
2025-04-29 07:33:51 +02:00
Translation updater bot
c2b5de68b3
Localisation updates from https://translatewiki.net.
Change-Id: I89e0bab6d19294ff1f993e65df12ccfbea228710
2025-04-22 07:33:11 +02:00
Translation updater bot
0f365d630b
Localisation updates from https://translatewiki.net.
Change-Id: I7757816ae8ab62edf8825b2055bbcab9e9b7c6f8
2025-04-15 07:32:55 +02:00
jenkins-bot
334b860bc7 Merge "block: Fix DBS::acquireTarget() race using GET_LOCK()" into REL1_43 2025-04-08 23:04:22 +00:00
Translation updater bot
ae9f56c1ed
Localisation updates from https://translatewiki.net.
Change-Id: I51b847bec127822655ffbdd08b19bfe05cddcec7
2025-04-08 07:34:00 +02:00
Tim Starling
edea1bc177 block: Fix DBS::acquireTarget() race using GET_LOCK()
A crude solution for the acquireTarget() race condition. Use SQL
GET_LOCK() to lock the target from the acquireTarget() call until the
transaction is committed.

Add FOR UPDATE to the acquireTarget() SELECT, otherwise it just sees the
snapshot version of the row and inserts a new row anyway.

Add a test which reliably failed prior to the change.

Reword the ipb-block-not-found message. This is normal for simultaneous
blocks of the same target. Don't contact us. In the API, remap it to
"alreadyblocked".

Bug: T389028
Change-Id: I1fa35bf08d456a93930194786f77df389217ba61
(cherry picked from commit 2b65587e4d92e7f27661e8821b14f74ade939cfa)
2025-04-07 11:43:34 +00:00
Translation updater bot
9de43c4fca
Localisation updates from https://translatewiki.net.
Change-Id: I8d8f8f876ce596712cfa46ec6d774ad14e5b8c1b
2025-04-01 07:32:43 +02:00
Translation updater bot
50fb129172
Localisation updates from https://translatewiki.net.
Change-Id: I0e3e387ab8ffd8d042bb81165a51ffcd6411e050
2025-03-25 06:33:36 +01:00
Func
06b9aa64b2 Apply proper restrictions on file revert action
Users should have 'reupload' or 'reupload-own' rights to do file revert.

Bug: T304474
Change-Id: I2d0eaeeea237286741708c2b5920fe7cca3acf50
(cherry picked from commit 7b4aee237e257954195c4d695b2cfe2a9a3b4116)
2025-03-24 12:55:44 +00:00
Translation updater bot
b5cdc575de
Localisation updates from https://translatewiki.net.
Change-Id: Iadf6b960fa78aa92aab16b4ea5835d9160237199
2025-03-18 06:31:56 +01:00
James D. Forrester
68329e412d ApiLogin: Don't break BotPasswords if password or user is blank, just error
Bug: T388255
Change-Id: Ibcc20d345cfe7b9410187a74f79f66c8e2326f2f
(cherry picked from commit 953ec56fa2c053fee514468e5710f706ee7c200c)
2025-03-13 18:44:12 +00:00
Translation updater bot
052664c1f0
Localisation updates from https://translatewiki.net.
Change-Id: I7db45053212cc3abc595a82f9136090d09dfceab
2025-03-11 06:32:45 +01:00
Translation updater bot
369b31f5ea
Localisation updates from https://translatewiki.net.
Change-Id: I8efdea63dce69f70911877f8c402daa05247f012
2025-03-04 06:34:04 +01:00
Translation updater bot
3f040e33bd
Localisation updates from https://translatewiki.net.
Change-Id: If360ec9295a3fd250b27dec146e81f205e0c6e54
2025-02-25 06:32:49 +01:00
Translation updater bot
086f0b5236
Localisation updates from https://translatewiki.net.
Change-Id: Ie6671ad9a673374b4d70a6fdfe0447e310d1db56
2025-02-18 06:32:08 +01:00
Translation updater bot
921fcc4d4c
Localisation updates from https://translatewiki.net.
Change-Id: If800b2998c86a9d9333057ccbcfe4e638dfbaca4
2025-02-11 06:32:37 +01:00
Translation updater bot
e00a967d45
Localisation updates from https://translatewiki.net.
Change-Id: If24feed544ade08f7f94ff61566392de84bb6a19
2025-02-04 06:32:24 +01:00
Translation updater bot
0677163554
Localisation updates from https://translatewiki.net.
Change-Id: If3a2f012b033ae6c05d001bb1531cb928044e9c6
2025-01-28 06:31:37 +01:00
Translation updater bot
922ba6c190
Localisation updates from https://translatewiki.net.
Change-Id: Iadbd52cbddf89c6f862d60d9f778c9a891d4010c
2025-01-21 06:32:19 +01:00
Translation updater bot
9530b23ee3
Localisation updates from https://translatewiki.net.
Change-Id: I7c5c2921596e509850cfa828ff4da00e9fbb6ea0
2025-01-14 06:31:37 +01:00
Translation updater bot
cacd3b793b
Localisation updates from https://translatewiki.net.
Change-Id: Ie051918d63ba73144f9a47c262cff016a9da4b88
2025-01-07 06:33:31 +01:00
Translation updater bot
91e434b9ba
Localisation updates from https://translatewiki.net.
Change-Id: I407e678d3272356af61f1aa4501da649e579c42f
2024-12-31 06:32:17 +01:00
Translation updater bot
0974f58a47
Localisation updates from https://translatewiki.net.
Change-Id: I990c03920d6eea71c57cd642fd257d959d328e79
2024-12-24 06:31:59 +01:00
Translation updater bot
28a23b6c17
Localisation updates from https://translatewiki.net.
Change-Id: I3bc5b5e1cf102d5de24e18e207ded1a1eb386c7c
2024-12-17 06:32:12 +01:00
Translation updater bot
243674529e
Localisation updates from https://translatewiki.net.
Change-Id: I63a0d567bfa65b73120645bc5820be2321b6d84f
2024-12-10 06:31:11 +01:00
Translation updater bot
c149a70c0e
Localisation updates from https://translatewiki.net.
Change-Id: Iee6d9a093d36164b67739c76651500c6eff23414
2024-11-26 06:31:54 +01:00
Translation updater bot
d5a793d5a2
Localisation updates from https://translatewiki.net.
Change-Id: Ide69282dbb21c4f1bb12e5ad90444472711cbf19
2024-11-19 06:32:07 +01:00
Translation updater bot
21eaa87821
Localisation updates from https://translatewiki.net.
Change-Id: Ifd10ef063d76695c30c0bc703b955d5c96c2430b
2024-11-12 06:32:03 +01:00
Umherirrender
1b29f07440 Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: I73fb416573f5af600e529d224b5beb5d2e3d27d3
2024-10-21 20:41:20 +02:00
jenkins-bot
cd7a5998e9 Merge "Make Message and MessageValue compatible" 2024-10-21 15:38:56 +00:00
Translation updater bot
8f3de71b9d
Localisation updates from https://translatewiki.net.
Change-Id: I470b03c872979240806dfd4db6d1b6ca8284a263
2024-10-21 09:01:48 +02:00
jenkins-bot
0adbc57f7b Merge "api: Check for post_max_size on api requests" 2024-10-19 21:59:39 +00:00
jenkins-bot
058b501166 Merge "api: Use type-declaration for string arg in ApiBase::__construct" 2024-10-19 21:52:22 +00:00
Bartosz Dziewoński
9d56257d8c Make Message and MessageValue compatible
Fix two problems that made it difficult to convert between Message
and MessageValue, or to write code that could accept both of them,
as exemplified by the StatusValue class:

* Implement a common interface
* Use the same internal format for message parameters

While these changes should be compatible with most of existing code,
where the authors were courteous enough to simply call methods such
as Message::numParam() and not look inside the values they return,
it is potentially a breaking change for anything that depended on
the formatted params being arrays or accessed their keys.
Example patches: https://gerrit.wikimedia.org/r/q/topic:message-param

Notable changes:

* Message and MessageValue now both implement MessageSpecifier
  (only Message implemented it before).

* Message::numParam() and other static methods for encoding params
  now return MessageParam objects, instead of special arrays.
  Use these MessageParam objects internally in Message.

* Narrow down the return type of MessageSpecifier::getParams() (it
  was just `array`, allowing any type in the array). Narrow down the
  types for Message::params() and MessageValue::params() to match.

* Deprecate MediaWiki\Message\Converter. As a replacement add
  MessageValue::newFromSpecifier(), which is analogous to
  Message::newFromSpecifier(), but without weird legacy edge cases.

* Make StatusValue::getMessages() return MessageValues. Remove code
  that converted between Message and MessageValue, no longer needed.

* Update many type declarations and comments to use MessageSpecifier
  instead of MessageValue, as well as a couple of tests that depended
  on implementation details.

Bug: T358779
Change-Id: I625a48a6ecd3fad5c2ed76b23343a0fef91e1b83
2024-10-19 15:00:07 +02:00
C. Scott Ananian
d6d6343c68 Deprecate OutputPage::{get,set}PreventClickjacking()
This is redundant with the same-named methods on ParserOutput.

Bug: T301020
Change-Id: I60455186e3a6e9b4329ff09e2f7ea920e2e05192
2024-10-17 23:51:39 -04:00
Umherirrender
be1c33e05e api: Check for post_max_size on api requests
php documentation:
If the size of post data is greater than post_max_size, the $_POST and
$_FILES superglobals are empty.

When the action= and format= are not in the GET data,
the help page is returned in html, breaking the clients expected format.

Return api error with http status 413

Bug: T291754
Change-Id: I5906fb6b4412b161b198df0b51e2476e7e1079b8
2024-10-17 18:22:41 +00:00
Umherirrender
1145328459 api: Use type-declaration for string arg in ApiBase::__construct
Also for all sub-classes
Remove simple doc-blocks without further information

Change-Id: I981934efe32d44f52e5ab865a9b887be5bd0f41e
2024-10-17 20:09:15 +02:00
Translation updater bot
51c6df1cc4
Localisation updates from https://translatewiki.net.
Change-Id: I7845b834d7497f34569961c94a2e02845c4d431d
2024-10-17 09:04:59 +02:00
jenkins-bot
abc8da60be Merge "Use explicit nullable type on parameter arguments" 2024-10-16 23:10:14 +00:00
Umherirrender
e662614f95 Use explicit nullable type on parameter arguments
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead

Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a

Break one long line in SpecialPage.php

Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
2024-10-16 20:58:33 +02:00
James D. Forrester
e7db78e8d6 Replace uses of deprecated ChangeTags static methods
Bug: T360664
Change-Id: I3363a225e54bb2cae01ba066d432a8b7b21933d2
2024-10-16 13:30:12 -04:00
James D. Forrester
a5387c7c20 Namespace all remaining classes in includes/parser
Bug: T353458
Change-Id: If02cc9b1ff78e26c1cf8c91ee4695845eb133829
2024-10-15 23:54:32 +01:00
Translation updater bot
b38604c108
Localisation updates from https://translatewiki.net.
Change-Id: I26fea4413f6d54e2e272f0498cf28649df2ef815
2024-10-15 09:07:29 +02:00
Translation updater bot
3ecaf9436f
Localisation updates from https://translatewiki.net.
Change-Id: Idd6c1af12f5e3c6e109dc07c9288d21ec3de9dcf
2024-10-14 09:04:59 +02:00
jenkins-bot
c3ed3b7e39 Merge "Add systemuser param to Users API List result to flag system user accounts" 2024-10-11 22:30:50 +00:00
jenkins-bot
dbe8c4b9aa Merge "WebRequest: Deprecate parameter $default in getRawVal" 2024-10-10 15:05:35 +00:00
Translation updater bot
16fe2c9d33
Localisation updates from https://translatewiki.net.
Change-Id: I6545bb71c0f803e471f38894057e806029d2df6e
2024-10-10 09:04:36 +02:00
Translation updater bot
db7e41ad76
Localisation updates from https://translatewiki.net.
Change-Id: I5b553e46652ce409459e85675c40982fc61c12f2
2024-10-07 09:05:49 +02:00