Commit graph

98774 commits

Author SHA1 Message Date
jenkins-bot
248a124d7e Merge "Reduce some direct references to $wgUser" 2020-09-25 18:40:30 +00:00
jenkins-bot
d4d9f5bbd0 Merge "Remove fallback to $wgUser in FileRepo::findFileFromKey" 2020-09-25 18:40:23 +00:00
jenkins-bot
cff5b9daac Merge "Remove fallback to $wgUser in LocalRepo::findFiles" 2020-09-25 18:36:58 +00:00
jenkins-bot
4d79d1b69a Merge "Remove fallback to $wgUser in FileRepo::findFile" 2020-09-25 18:35:51 +00:00
jenkins-bot
d9d0d705fe Merge "BlockUser: Avoid getUserPage() on string" 2020-09-25 18:03:35 +00:00
jenkins-bot
dfd20f444c Merge "EditPage: Don't apply numeric formatting unless a value message is defined" 2020-09-25 17:52:08 +00:00
jenkins-bot
bd5e82b638 Merge "MessagesCbk_zam.php: Use single quotes for consistency" 2020-09-25 17:47:19 +00:00
DannyS712
cebbfe47fd Reduce some direct references to $wgUser
Bug: T243708
Change-Id: Ief59ce77469de4185c031413e64d0dee3ea26e60
2020-09-25 17:46:56 +00:00
DannyS712
8dc5e1413d Remove fallback to $wgUser in LocalRepo::findFiles
Use RequestContext::getMain()->getUser(), per task

Bug: T263033
Change-Id: I78a2af031c5157d58f369c58c9f98376ba44a921
2020-09-25 17:44:51 +00:00
jenkins-bot
eefc0b9fdb Merge "Move RELEASE-NOTES-1.35 into HISTORY" 2020-09-25 17:37:50 +00:00
jenkins-bot
053bd8e77f Merge "maintenance: Move sqlite from .inc to .php" 2020-09-25 17:27:18 +00:00
jenkins-bot
0081a33da4 Merge "maintenance: Move sqlite.php to SqliteMaintenance.php to match class name" 2020-09-25 17:27:12 +00:00
DannyS712
dbc07d39db BlockUser: Avoid getUserPage() on string
Bug: T189073
Change-Id: I0ce8a1527126c753d1fe5f6c2903a42d7d13ca71
2020-09-25 17:01:29 +00:00
James D. Forrester
be448ac1b2 maintenance: Move sqlite from .inc to .php
Bug: T184782
Change-Id: I18fabbcc8588518f5cc10c8e3f0fba2379263c6c
2020-09-25 17:36:38 +01:00
James D. Forrester
4272da2c62 maintenance: Move sqlite.php to SqliteMaintenance.php to match class name
Change-Id: I4d6be08082fd1841d3056a0554376e8e9665b429
2020-09-25 17:36:36 +01:00
Reedy
2055aec0ff Move RELEASE-NOTES-1.35 into HISTORY
Change-Id: Ida3655e878d96b5f7a93470ff42122b7daab9c38
2020-09-25 16:31:07 +00:00
Petr Pchelko
b21adfc7f8 Allow back getting/setting dynamic properties on ParserOutput.
Followup on Ic911c2724ad709931d3316e609781fb89b5b7b28

Bug: T263851
Change-Id: I6a3b8d43d9727e49f245bddf3b8380541ed4153a
2020-09-25 08:17:10 -07:00
C. Scott Ananian
45183f0bf2 EditPage: Don't apply numeric formatting unless a value message is defined
In order to apply numeric formatting to the limitreport for $key, the
message $key and $key-value (or $key-value-html) needs to be defined.

The core parser doesn't define messages for non-numeric limitreport
data (so it is suppressed in the EditPage preview), but Scribunto
does.

Bug: T263592
Change-Id: Ib775739fbe3cadb28913ae61002622e80490056b
2020-09-25 09:40:16 -04:00
jenkins-bot
e8da85d0e9 Merge "maintenance: Move userDupes from .inc to .php" 2020-09-25 12:37:52 +00:00
jenkins-bot
52444299b4 Merge "maintenance: Move CodeCleanerGlobalsPass from .inc to .php" 2020-09-25 12:31:39 +00:00
Translation updater bot
368b56ede3 Localisation updates from https://translatewiki.net.
Change-Id: Ibdc7c22c6746c397ac72ff1fc5ecde0e73498d2d
2020-09-25 08:20:26 +02:00
jenkins-bot
8bc404352a Merge "Adding handling for no user passed to LocalFile::upload" 2020-09-25 00:10:26 +00:00
jenkins-bot
121ed6c921 Merge "Add 1.31.9/1.31.10/1.34.3/1.34.4" 2020-09-24 23:48:59 +00:00
DannyS712
1f9ca53b3b Adding handling for no user passed to LocalFile::upload
Bug: T263811
Change-Id: I5fed0c9e2ba2b722e414c6063ee0ab56c80b1dbd
2020-09-24 23:40:51 +00:00
jenkins-bot
52bc746afa Merge "User: Use "Unknown user" for bad user id" 2020-09-24 22:47:47 +00:00
Clara Andrew-Wani
79afec9457 User: Use "Unknown user" for bad user id
Without this, a user created from an invalid user ID would end up
representing the current requests IP address, which may lead to
confusion. Using the reserved name "Unknown user" seems safer.

Change-Id: Icbfe7c3a561ac927713b610ac9a0b5e6b88bf2f0
2020-09-24 22:23:38 +00:00
Reedy
13b94c229f Add 1.31.9/1.31.10/1.34.3/1.34.4
Bug: T256339
Change-Id: I9890730e9992e4a6adb3221112a8b20bdba8a762
2020-09-24 23:16:18 +01:00
daniel
4fe4407731 SECURITY: ensure actor ID from correct wiki is used.
This builds on top of Urbanecm's patch, now also covering the case
where the actor ID does not exist in the target DB, but does exist in
the local DB.

Bug: T260485
Change-Id: I2336954c665366a99f9995df9b08071d4de6db79
(cherry picked from commit ca4094db9e7f6f5e330d89db6bf70a8af48e1561)
2020-09-24 19:37:43 +01:00
Martin Urbanec
037e63c2f7 SECURITY: ActorMigration: Load user from the correct database
In ActorMigration::getInsertValues, when creating a User object, calling
User::getActorId triggers a call to User::load, which ignores
the database passed to getInsertValues, meaning incorrect actor IDs
are returned.

To ensure that the correct (foreign) database is used, try
to get the actor ID from the correct database within ActorMigration
service, and if that fails, let User class handle the actor ID creation.

Todo notes are left in the patch to fix the issue properly,
by making User object wiki-aware.

Bug: T260485
Change-Id: Iaa886a1824e5a74f4501ca7e28917c780222aac0
2020-09-24 18:20:02 +00:00
jenkins-bot
b43b4c728f Merge "Revert "Revert "Hard deprecate all public properties in CacheTime and ParserOutput""" 2020-09-24 16:26:17 +00:00
Bartosz Dziewoński
d0b7fb495c SECURITY: mediawiki.js: Escape HTML in mw.message( ... ).parse()
This basically makes it equivalent to .escaped() and not .text().

Does not affect the mediawiki.jqueryMsg version, which still accepts
whitelisted HTML tags.

CVE-2020-25828

Bug: T115888
Change-Id: I6513dfb480024309e1594abc6f07bbd3b0c5a10e
2020-09-24 16:24:39 +01:00
Brian Wolff
f00781c0dd SECURITY: mediawiki.jqueryMsg: Sanitize URLs and 'style' attribute
Previously you could leverage the style attribute, and external
links to execute javascript.

CVE-2020-25814

Bug: T86738
Change-Id: I6f15ece1db136369e06dfeee34d1a0c5bc03e32b
Co-Authored-By: Roan Kattouw <roan.kattouw@gmail.com>
Co-Authored-By: Lucas Werkmeister <lucas.werkmeister@wikimedia.de>
2020-09-24 16:24:39 +01:00
Kunal Mehta
d45e2fef6d SECURITY: Prevent invoking firejail's --output functionality
firejail has an RCE in its handling of --output when dealing with untrusted
arguments (CVE-2020-17367 and CVE-2020-17368). We can avoid this issue by
preventing shelling out to firejail if any parameter starts with '--output'.

Bug: T258763
Change-Id: Ic6a5644566a51a948de7b42daf57b29ced3daff4
2020-09-24 16:24:36 +01:00
Ppchelko
deacee9088 Revert "Revert "Hard deprecate all public properties in CacheTime and ParserOutput""
This reverts commit a4dc6d82af.

I've reverted the merged patch since I didn't do enough testing
on serialized/reserialized ParserOutput and CacheTime. Now I'm
confident serialization/deserialization works.

Changes since original reverted version:
 - Use __get/__set instead of DeprecationHelper in order to
   avoid $deprecateProperties array to be serialized.
 - Add test for old format serialization new format deserialization.

Change-Id: Ic911c2724ad709931d3316e609781fb89b5b7b28
2020-09-24 07:55:18 -07:00
sbassett
ad21a02e16 SECURITY: Unescaped message used in HTML within LogEventsList
* Use options-messages instead of text() for messages used to
  build HTML multi-select field.
* Clean up old FIXME conditional since T199657 has been resolved
  for over a year now.

CVE-2020-25815

Bug: T256171
Change-Id: Ib8f95f5510320f7fc2163625214c3c198be5941a
2020-09-24 14:30:58 +01:00
sbassett
358c1ec070 SECURITY: Escape messages used as keys on Special:Contributions
Use options-messages instead of text() for message-based options keys

CVE-2020-25812

Bug: T255918
Change-Id: I58543f7b2c24c5e1f8c97ee6064bed90d737111b
2020-09-24 14:30:58 +01:00
Meno25
18160c0e96 Update specialPageAliases and magicWords for Egyptian Arabic (arz)
Change-Id: Iee0e9c9021b0244014a162ae08f8d5f737cd93db
2020-09-24 11:35:44 +00:00
Niklas Laxström
3aa36d867b MessagesCbk_zam.php: Use single quotes for consistency
Change-Id: I165af616ed5da3520d1c892319a0126a06c358dd
2020-09-24 11:47:11 +02:00
James D. Forrester
6f93a6274f build: Updating mediawiki/mediawiki-phan-config to 0.10.3
Change-Id: I145cac62c674b5b10db6d3491a6778038a07d5b4
2020-09-24 09:28:32 +01:00
jenkins-bot
daa5ba9e06 Merge "registration: Switch initialisation code from AtEase to @" 2020-09-24 06:48:14 +00:00
jenkins-bot
82b5f45362 Merge "shell: Don't blacklist /run/firejail" 2020-09-24 06:38:04 +00:00
Translation updater bot
6fc94a428b Localisation updates from https://translatewiki.net.
Change-Id: I5a7b83a4236be110ef52e4a9dbb27265d4429de4
2020-09-24 08:27:42 +02:00
jenkins-bot
e991f2ce3b Merge "ParserOutput: don't throw on bad editsection" 2020-09-24 01:05:01 +00:00
jenkins-bot
41260075fe Merge "RELEASE-NOTES-1.35: Note that Zeroconf VisualEditor/Parsoid doesn't work on SQLite" 2020-09-23 23:24:50 +00:00
jenkins-bot
28eea8c607 Merge "Revert "Hard deprecate all public properties in CacheTime and ParserOutput"" 2020-09-23 23:10:38 +00:00
Ppchelko
a4dc6d82af Revert "Hard deprecate all public properties in CacheTime and ParserOutput"
This reverts commit 799c10b7eb.

Reason for revert: Didn't test how this would work with deserializing stored ParserOutput.

Change-Id: I4221bc26282f3b4bd044f0ab50d00e77eb57ede0
2020-09-23 22:46:33 +00:00
Reedy
3dc775e0b0 RELEASE-NOTES-1.35: Note that Zeroconf VisualEditor/Parsoid doesn't work on SQLite
Bug: T259349
Bug: T259685
Change-Id: I339ebecae67ec41f2a64783b454816cd370b6479
2020-09-23 22:32:05 +00:00
daniel
e6f37dc1d8 ParserOutput: don't throw on bad editsection
When ParserOutput encounters a bad page title in an editsection
placeholder, this should not cause a fatal error. We can just not
produce an edit link and continue.

It's still worth logging though, since the parser shouldn't be putting
invalid links into editsection placeholders.

Bug: T261347
Change-Id: I154e85aec4b408e659e6281b02473c51f370865d
2020-09-23 22:30:59 +00:00
Ammar Abdulhamid
b536db40e3 Provide basic anon personal menu placeholder.
With this minimal change, the placeholder is integrated into the
personal tools. It's basic by default, so skins can use it as is,
customize it further if need be or even unset it altogether.
For instance, Vector uses different icon from what from MonoBook
uses, but both need to duplicate the basic placeholder.

Timeless needs to unset it. Modern can use it as is.

The benefit is that this will allow us to remove the hacky string
concatenation for it in Vector and also remove the duplication for
the same thing in MonoBook. 

More importantly, it will also allow us to remove a hack for the
UniversalLanguageSelector extension inside at least three skins
which was necessitated because the string concatenation, besides
being isolated from the menu building abstraction, is also
interfering with some permutations about the position of the items.

Note anonymous pages are subject to caching you please apply
?action=purge when testing.

Bug: T263382
Depends-On: I5691529ab8c59f4053cff38ea6f7dd01c326c074
Depends-On: I008511f5fc326bca10f2c2bf4e03b2df3561b56e
Depends-On: I0ba502a1e1368c1080caee2ce2bb45c27fdf77c3
Change-Id: Ice379cd8a68530b586a8a8c288ac65bb978f775c
2020-09-23 21:01:56 +00:00
jenkins-bot
cd212ea28f Merge "Inject services into SpecialBlockList/SpecialAutoblockList" 2020-09-23 20:47:34 +00:00