Commit graph

98794 commits

Author SHA1 Message Date
jenkins-bot
4c3256d64b Merge "objectcache: replace count metric with timing metric for WAN cache gets" 2020-09-28 19:49:08 +00:00
jenkins-bot
da3270feac Merge "Hard-deprecate passing -1 to CacheTime::setCacheTime" 2020-09-28 18:25:11 +00:00
jenkins-bot
f66912bba2 Merge "Ignore block restrictions if block is not specified as partial" 2020-09-28 17:58:17 +00:00
jenkins-bot
f6f40e0f95 Merge "maintenance: Move commandLine from .inc to .php" 2020-09-28 17:29:12 +00:00
Thalia
fb8622d6d9 Ignore block restrictions if block is not specified as partial
In SpecialBlock, ignore restrictions if the 'sitewide' radio was
selected. In ApiBlock, ignore restrictions if the 'partial' parameter
was falsey.

In both cases, ignoring restrictions means not passing them to
BlockUser.

This restores the behaviour prior to a656d03597, that a block is
sitewide unless it is marked as partial, even if restrictions options
are set.

Bug: T189073
Change-Id: I4d2e08b744b9d59909ce24cc5f167b676478970d
2020-09-28 17:23:43 +01:00
jenkins-bot
17291773c1 Merge "Create ParserCacheFactory." 2020-09-28 16:13:37 +00:00
jenkins-bot
1d3df7d828 Merge "ParserCache::get - drop support for passing Article." 2020-09-28 15:56:00 +00:00
James D. Forrester
7282ea26a4 maintenance: Move commandLine from .inc to .php
… and fix the name to match the class.

Bug: T184782
Change-Id: Id3d0d0a6b3f2da6316d18eb57804c5a2b697108b
2020-09-28 15:03:05 +00:00
MarcoAurelio
598154a5d7 Update CREDITS
Change-Id: Ia5e87457a9e01c9a702ef74848b15623e1a94539
2020-09-28 12:53:22 +00:00
Translation updater bot
e519fd3f33 Localisation updates from https://translatewiki.net.
Change-Id: I8d12c520e9ba14107b02e4489ad65686a1b27e1d
2020-09-28 08:27:52 +02:00
Petr Pchelko
6417f2c49f ParserCache::get - drop support for passing Article.
Deprecated in 1.35. However, if you look closely,
the deprecation warning emitting code was passing
numeric 1.35 instead of a string '1.35' which caused
the deprecation function to throw an exception.

Thus, this code has not been deprecated in 1.35, but
was accidentally broken. Instead of fixing the deprecation,
just remove the fallback.

Change-Id: I369f03d6b01053fc0396beb635c7b7d49bd249da
2020-09-27 15:46:34 -07:00
jenkins-bot
daa5c53dfc Merge "Alphasort TrackingCategories::$coreTrackingCategories" 2020-09-27 16:23:56 +00:00
jenkins-bot
785996f28a Merge "Register 'nonnumeric-formatnum' in TrackingCategories::$coreTrackingCategories" 2020-09-27 16:21:41 +00:00
Reedy
3f1454bfd2 Alphasort TrackingCategories::$coreTrackingCategories
Change-Id: I3325ae6a48f7ac6b9048703c1622a8d0c576c12b
2020-09-27 16:03:17 +00:00
Reedy
9ebd96acda Register 'nonnumeric-formatnum' in TrackingCategories::$coreTrackingCategories
Bug: T237467
Follows-Up: Ib6c832df1f69aa4579402701fad1f77e548291ee
Change-Id: I08df861ec6c93ee9b2b02843c667854a3e017270
2020-09-27 15:00:05 +00:00
Reedy
e9fec5c407 Add function documentation to CoreParserFunctions::getLegacyFormatNum()
Change-Id: I8d98fa4b4de4eda4684ea61ec8dab65c6717cab3
2020-09-27 15:55:19 +01:00
Umherirrender
d790580fda Fix typos related to repeated words
Change-Id: Ibc187d95b003017255bc87adf56afae7a59bd3db
2020-09-27 10:25:36 +00:00
Petr Pchelko
fec48eb5a4 Create ParserCacheFactory.
* Makes ParserCache take the root of the key
  as a constructor argument
* Introduces a ParserCacheFactory

Next steps:
- convert FlaggedRevs to using this.
- cleanup

This assumes that we wouldn't want to differentiate
the parser cache settings per use-case, as it is now
for default vs flaggedrevs caches. There are only two settings:
$wgParserCacheType - name of the BagOStuff to use
$wgParserCacheExpireTime - the expiration time.
I think if we wanted to have different settings for different
caches, we could add that as a next step.

Bug: T263583
Change-Id: I188772da541a95c95a5ecece7c7dd748395506c2
2020-09-25 18:17:58 -07:00
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