Commit graph

119308 commits

Author SHA1 Message Date
Isabelle Hurbain-Palatin
33908cebed Revert "Revert "Remove unused class_alias deprecated in MW 1.40""
This reverts commit cbde6b69de to re-apply
the initial patch. This should only be merged once
I2acfd0b7a1e48aec107ded3bbe4963e2df24f4d3 is deployed.

Change-Id: If12ab65b1d773946fca6c8601ff51290136549c8
2023-09-29 13:08:50 +02:00
jenkins-bot
692c9a360d Merge "Revert "Remove unused class_alias deprecated in MW 1.40"" 2023-09-29 10:58:05 +00:00
jenkins-bot
3a9201dcd5 Merge "Support message parameters on the uselang=x-xss feature" 2023-09-29 09:38:30 +00:00
Isabelle Hurbain-Palatin
cbde6b69de Revert "Remove unused class_alias deprecated in MW 1.40"
This reverts commit ec22840c4a.

This patch currently creates issues on beta, which still runs with the
latest vendor version of Parsoid. If, for some reason, Parsoid doesn't
get deployed with this patch, I2acfd0b7a1e48aec107ded3bbe4963e2df24f4d3
doesn't get included, and the REST page handler breaks.

Staggered deploy seems safer in this context, hence the proposal for a
temporary revert, and a merge after the next Parsoid vendor patch is
deployed.

Change-Id: I3f859fa807a04892a67323cd4e98be0d3fbb1676
2023-09-29 11:21:49 +02:00
jenkins-bot
7c64faaa58 Merge "Revert offsetType disabling from 1aa71cf5: Parsoid's rt-testing needs it" 2023-09-29 01:19:31 +00:00
Subramanya Sastry
311e1a9a43 Revert offsetType disabling from 1aa71cf5: Parsoid's rt-testing needs it
* Parsoid's rt-testing script is still a node.js script and hence needs
  ucs2 offests for its syntactic / semantic diff classification.

* So, we cannot let 1aa71cf5 ride the train since it will break
  Parsoid's rt-testing. We'll figure out an alternative way of handling
  it, but for now, I am reverting that part of the patch.

* Document in the ParsoidHandlerTest test that ucs2 offsets are used and
  cannot be changed to 'byte'

Bug: T347426
Change-Id: Ifa833e01ef117d7bcd6da1c7eb542535192662eb
2023-09-28 19:56:43 -05:00
Reedy
1cc87dbf5a SECURITY: Add xml mime types to $wgMimeTypeExclusions
CVE-2023-3550

Bug: T341565
Change-Id: Ic74b8adcc0db6826a4159bb9c0ea8dfaecc77c09
2023-09-29 00:32:14 +01:00
Maryum Styles
3cc1781815 SECURITY: DifferenceEngine: hide diff-multi-sameuser message for supressed revisions
CVE-2023-PENDING

reduce the edit count if a user for a given revision is suppress-deleted

Bug: T341529
Change-Id: I79539464cf3500065cb4f42e1542ff5feec31395
2023-09-29 00:32:14 +01:00
Reedy
b889a9197d SECURITY: Add xml to $wgProhibitedFileExtensions
CVE-2023-3550

Bug: T341565
Change-Id: I3d9fdef420fdf7588d0942a6cd07cb25a00c6fb0
2023-09-29 00:32:14 +01:00
Maryum Styles
902ab32e1a SECURITY: Add 'youhavenewmessagesmanyusers' and 'youhavenewmessages' to $wgRawHtmlMessages
CVE-2023-PENDING

Bug: T340221
Change-Id: Ic36cd39421e5f5540cd1600c9d7efbec763b8d86
2023-09-29 00:32:14 +01:00
jenkins-bot
97d3cd4ed0 Merge "Message: Time period params can be floats" 2023-09-28 23:20:03 +00:00
jenkins-bot
573ae1b5f3 Merge "WatchedItemStore: Avoid table insert with empty rows" 2023-09-28 21:37:15 +00:00
Bartosz Dziewoński
300dda451f Message: Time period params can be floats
They are passed to Language::formatTimePeriod(), which accepts floats.

Phan recently learned to enforce these annotations.

Change-Id: I3e7bb0f4a79fd563b94b738bb63541da986bb87a
2023-09-28 23:26:02 +02:00
jenkins-bot
0ff0d237b4 Merge "Disable Parsoid support for non-default output versions and offset types" 2023-09-28 21:19:35 +00:00
Ammarpad
0a85c69fc1 WatchedItemStore: Avoid table insert with empty rows
Bug: T347610
Change-Id: I0249cb1482d016a91b397642e384bd3fe3a2358e
2023-09-28 21:44:49 +01:00
jenkins-bot
395b9360cf Merge "InsertQueryBuilder: When passed no rows, warn rather than die for now" 2023-09-28 20:34:13 +00:00
jenkins-bot
3f71449ca5 Merge "Use Authority to check rate limits in the API." 2023-09-28 20:24:31 +00:00
jenkins-bot
b439a16de0 Merge "Hard-deprecate Article::getRedirectHeaderHtml()" 2023-09-28 20:22:57 +00:00
jenkins-bot
b767428399 Merge "api: Add rvcontentformat-{slot} to define output format per slot" 2023-09-28 20:00:38 +00:00
C. Scott Ananian
921aaa53c9 Hard-deprecate Article::getRedirectHeaderHtml()
Code search:
https://codesearch.wmcloud.org/deployed/?q=getRedirectHeaderHtml

Depends-On: I16d30ef5bd1414c9b7d2c9f4a61c41ffe3a532c2
Depends-On: I5fab34409c89803c318901930d988759a00bf849
Change-Id: Iad382aed49f04cd0046f97361d1efa1d375a8e03
2023-09-28 16:00:19 -04:00
jenkins-bot
eb1ee080de Merge " doc: Improve description of type in extension.schema.v1.json" 2023-09-28 19:55:03 +00:00
jenkins-bot
ca2336ac57 Merge "DefaultOptionsLookup: make NamespaceInfo private" 2023-09-28 19:51:06 +00:00
jenkins-bot
54d914dbeb Merge "Add some typed properties to User-related services" 2023-09-28 19:50:47 +00:00
jenkins-bot
c13be9bad1 Merge "OutputPage: Refactor outputting of mMetatags for clarity" 2023-09-28 19:50:17 +00:00
James D. Forrester
f8b0bdafe2 InsertQueryBuilder: When passed no rows, warn rather than die for now
Bug: T347610
Change-Id: Ia77e75ebc38f26ffddc076fe9141a124d323257b
2023-09-28 15:48:30 -04:00
jenkins-bot
e344c53b2c Merge "Remove unused class_alias deprecated in MW 1.40" 2023-09-28 19:03:09 +00:00
Fomafix
ec22840c4a Remove unused class_alias deprecated in MW 1.40
The Helper classes are deprecated since 1afd52e3e4.

Depends-On: I2acfd0b7a1e48aec107ded3bbe4963e2df24f4d3
Change-Id: Ie9973c6d6474bb7b4720c0641ca7492dc946d923
2023-09-28 18:47:13 +00:00
Bartosz Dziewoński
34b32b080b OutputPage: Refactor outputting of mMetatags for clarity
It was a bit hard to follow where the attribute names were generated.
Also give names to $tag[0] and $tag[1].

Change-Id: I0267e478a84d68853e7b8d60fac92936cd48600b
2023-09-28 18:43:39 +00:00
DannyS712
06d1a13819 DefaultOptionsLookup: make NamespaceInfo private
Class is not extended anywhere or stable to extend

Change-Id: I1746fc13ade14218da6815a63c4d3daebdd2d7fc
2023-09-28 18:26:32 +00:00
DannyS712
53f4b1526a Add some typed properties to User-related services
Change-Id: Ia73c3a044dfa50e9d9d43bf0e28eed2f65edcdce
2023-09-28 18:26:27 +00:00
Umherirrender
67c6409417 api: Add rvcontentformat-{slot} to define output format per slot
rvcontentformat was deprecated in 07842be without replacement,
but it allows to control the expected output format of the content for
the client.
This is only useful for content handler with different formats,
like ProofreadPage's proofread-index format (supports wikitext and json)
or Wikibase's wikibase-property (supports json and php)

Bug: T174032
Bug: T321446
Change-Id: I4e0cde9c2d5c2857028e6dfa2b96ba9070a7fa8e
2023-09-28 18:02:09 +00:00
jenkins-bot
da12b93c2c Merge "Hard deprecate unnamespaced UserNamePrefixSearch" 2023-09-28 16:34:36 +00:00
Fomafix
6d61b366a2 Support message parameters on the uselang=x-xss feature
This allows to check also message parameters for possible JavaScript
injections.

Bug: T340201
Change-Id: I6bef28cd9c6b91713b66b40cba46e9b2dc2a1f05
2023-09-28 15:33:00 +00:00
DannyS712
b5593b2a54 Hard deprecate unnamespaced UserNamePrefixSearch
Change-Id: I54c093f9bf2eab2b464d1d46049af88fffd6e056
2023-09-28 15:18:48 +00:00
DannyS712
1ab7f3d218 User: wfDeprecated should reflect original deprecation version
Not the version things were hard deprecated in

Change-Id: Idb2988d9c96786671c9390b105fece85cceef235
2023-09-28 15:12:03 +00:00
jenkins-bot
edd17a18d4 Merge "Make EmailUser stable, deprecate old methods" 2023-09-28 14:36:20 +00:00
jenkins-bot
f247852e07 Merge "Add base taint-check annotations to Delete- and UpdateQueryBuilder" 2023-09-28 14:35:57 +00:00
jenkins-bot
21853ff498 Merge "Add base taint-check annotations to InsertQueryBuilder" 2023-09-28 14:35:45 +00:00
jenkins-bot
eee0da9c39 Merge "Create 'x-xss' language code feature" 2023-09-28 14:35:08 +00:00
jenkins-bot
703b66cce0 Merge "Remove taint-check annotations from IDatabase::insert()" 2023-09-28 13:57:58 +00:00
Lucas Werkmeister
e9991ffb68 Create 'x-xss' language code feature
This creates a new language code, 'x-xss', which is enabled using the
setting $wgUseXssLanguage (similar to how $wgUsePigLatinVariant enables
the 'en-x-piglatin' language code, and likewise defaults to false; will
be enabled in development settings soon).

In this language code, all messages become “malicious”, trying to run
some alert() JavaScript; if any alert() actually fires in the browser,
the message was not escaped properly. ($wgRawHtmlMessages are exempt,
since they’re already known to be “unsafe” and require more rights to
edit on-wiki.) Messages that are not escaped properly are generally a
minor security issue; they effectively let a user with 'editinterface'
right (such as a sysop, on many wikis) run arbitrary JS, without needing
the 'editsitejs' right (normally restricted to interface admins).

Developers can use this language code to more easily check their code
for escaping issues / cross-site scripting vulnerabilities.

Bug: T340201
Change-Id: Ia9a1cf712b139fea5da72046e37035e6de39d8d5
2023-09-28 15:50:11 +02:00
jenkins-bot
5c9eaeafef Merge "Add language Karekare (kai)" 2023-09-28 11:37:18 +00:00
DannyS712
be7db06fe1 RELEASE-NOTES: fix section for codesniffer update
Its a development-only library

Follow-up: I8ab11399c67ce7e3ab1b6249b591452774393428
Change-Id: I245dff6f1a9138a7f7ba4f1ecdc4297b5ede2488
2023-09-28 00:56:57 +00:00
jenkins-bot
1155732861 Merge "profiler: Cleanup base class and remove dead code" 2023-09-28 00:49:56 +00:00
Derick Alangi
b7a34fcb23 profiler: Cleanup base class and remove dead code
* Deprecate ::setProfileID(). This was added in r17776 to allow callers
  (e.g. LocalSettings.php and StartProfiler.php, outside Git) to change
  the ID at runtime. Site admins don't seem to do this in practice.
  We have since then introduced request IDs, and the ability to
  declaratively describe the Profiler singleton via $wgProfiler,
  where 'profileID' is already supported nowadays.

  The propertly can stil be set for other purposes by sub-classes.

* Remove ::setContext() and ::getContext() which was already hard
  deprecated a while ago (1.38).

* Deprecate ::getAllowOutput() which is unused.

* Profiler::$context has been removed too since the methods consuming
  this member has been removed.

Change-Id: Id2ff252e506d4445e68e1e944d44f3b4b0bdbdb4
2023-09-28 00:34:14 +00:00
Daimona Eaytoy
eabe54c620 Add base taint-check annotations to Delete- and UpdateQueryBuilder
Bug: T253380
Change-Id: I398a65e22b154702f6ec42bfff2676f4720b99ea
2023-09-28 02:06:34 +02:00
Daimona Eaytoy
57a311c375 Add base taint-check annotations to InsertQueryBuilder
Note that row() and rows() cannot be described with annotations, and
they need to be hardcoded in taint-check instead
(I7623ba5112bfffbcf972cc366e0db99ee75b448e).

Also annotate SelectQueryBuilder::caller(), as a follow-up to
Ic9fb15e083cca75c2b5c6bddd1df87b148acca6e.

Bug: T253380
Change-Id: Id4a884f5b91683d3946c712ac4149ffe855d7683
2023-09-28 01:58:20 +02:00
jenkins-bot
14cec3f86b Merge "MediaWiki: Re-arrange code so $host really only contains the host" 2023-09-27 23:23:50 +00:00
Daimona Eaytoy
53be08f8c6 Remove taint-check annotations from IDatabase::insert()
The $rows parameter is too complex for annotations:
- Only the keys are tainted, but not the values.
- The single-row and multi-row cases need to be handled separately.

Neither of these can be described with annotations. Therefore, the
taintedness of this methods needs to remain hardcoded in the plugin
itself.

Bug: T290563
Change-Id: Ib7147e9b2cd99431a009b4bd4a9b0a2036f3f5b4
2023-09-28 01:09:43 +02:00
James D. Forrester
139a27887c Drop SpecialBlock::checkUnblockSelf(), deprecated since 1.36
Change-Id: I4f7121db0bc1fda0a162e8762975edbc2b63ce19
2023-09-27 22:43:03 +00:00