Commit graph

95146 commits

Author SHA1 Message Date
C. Scott Ananian
063445581c Always cache magic word expansions
The existing magic word API (including hooks) gives implementers direct
access to $parser->mVarCache and full control of caching.  Simplify the
implementation (prior to moving the magic word implementations out of
Parser.php) by always caching built-in magic words in $parser->mVarCache.

The cases which were skipping the cache don't vary anyway.

This behavior change is split from the rest of the refactoring in
I68fb1e786374e445b7df047934c532d7e10b8e94 to allow it to be deployed
separately, just in case there was some strange reason this would
cause regressions in practice.

Bug: T236813
Change-Id: I34a0d9a37e41c854c801d546427fc8cd0fe39dc4
2020-03-27 08:58:39 -04:00
jenkins-bot
fa5c5b1ad9 Merge "Remove skipcaptcha from the basic grant" 2020-03-27 12:00:49 +00:00
jenkins-bot
ef8a34d4a2 Merge "REST: page/ endpoints: don't use tokens with OAuth" 2020-03-27 11:43:30 +00:00
jenkins-bot
e0e72b165c Merge "Document the deprecations in I46684bc492bb74b728ff102971f6cdd4d746a50a" 2020-03-27 11:41:11 +00:00
daniel
905f6fc890 REST: page/ endpoints: don't use tokens with OAuth
CSRF tokens should only be required (and only be allowed) if
the current session isn't already inherently safe against
CSRF due to the way the authentication mechanism works.
This allows (and requires) tokens to be omitted for requests
that use an OAuth Authorization header.

Bug: T230843
Bug: T230842
Bug: T237852
Change-Id: Ib2922d556ff2470d4bf8c386c18986ca9f37d1b5
2020-03-27 12:20:22 +01:00
jenkins-bot
55d3efdb7c Merge "Add a new UserNameUtils service" 2020-03-27 08:58:48 +00:00
DannyS712
de2abc19f3 Document the deprecations in I46684bc492bb74b728ff102971f6cdd4d746a50a
Change-Id: Ieecd40e49ea7c382ce479782c60e43969c91a39a
2020-03-27 08:46:22 +00:00
Translation updater bot
c6ac92433e Localisation updates from https://translatewiki.net.
Change-Id: I781f73e3d3c5f75aff1d8b0e07fb17bab19102d5
2020-03-27 08:39:40 +01:00
jenkins-bot
b2be858d92 Merge "Remove direct access to Action::page and Article::page properties" 2020-03-27 04:36:51 +00:00
ArtBaltai
726a2650d3 Remove direct access to Action::page and Article::page properties
Bug: T239975
Change-Id: Id0d4d1e099edbdd67cabbed423dfff68cc48d323
2020-03-27 04:10:51 +00:00
jenkins-bot
6bd26d6067 Merge "Fix skipping of parser test suites" 2020-03-27 02:59:47 +00:00
jenkins-bot
8e5201f569 Merge "Updating psr/log (1.1.2 => 1.1.3)" 2020-03-27 01:47:15 +00:00
jenkins-bot
a91378eef1 Merge "Updating psy/psysh (v0.9.12 => v0.10.2)" 2020-03-27 00:51:57 +00:00
jenkins-bot
77805e55d7 Merge "Hard deprecate Revision::getQueryInfo and ::getArchiveQueryInfo" 2020-03-27 00:51:24 +00:00
jenkins-bot
637cfc62ad Merge "Remove transform-origin property due to set to initial value" 2020-03-27 00:38:01 +00:00
Reedy
5bfeed50dd Updating psr/log (1.1.2 => 1.1.3)
Change-Id: Ie0335f689da60679f77a91f94fcc6aacbedec56a
Depends-On: I8d8c3deae65b74d2837720a31d0b39b647f70e69
2020-03-27 00:33:49 +00:00
Volker E
85e92b2298 Remove transform-origin property due to set to initial value
Change-Id: I4c2e224b024a8b9f0c70b5729470918bc7670136
2020-03-26 17:06:53 -07:00
DannyS712
1d4df4f221 Hard deprecate Revision::getQueryInfo and ::getArchiveQueryInfo
Bug: T246284
Change-Id: I708f265aac3016e34d02936cf5dff98a3036ef0f
2020-03-26 23:53:19 +00:00
Reedy
9152bf3e75 Updating psy/psysh (v0.9.12 => v0.10.2)
Change-Id: I3e80e57ac81f3e2f0134cdbe8b03afa38d50050a
Depends-On: I0fe98ea993a1c7f9874cf1536f626d5ba87012ca
2020-03-26 23:47:38 +00:00
C. Scott Ananian
99f6b82995 Deprecate the ParserGetVariableValueVarCache hook
We don't want to expose the internal caching mechanism of the parser.
There are no uses in deployed WMF code:

https://codesearch.wmflabs.org/deployed/?q=ParserGetVariableValueVarCache&i=nope&files=&repos=

Bug: T236813
Change-Id: I1b0a5cf7d32be86a45d7231940360e2bfce7275f
2020-03-26 18:47:30 -04:00
jenkins-bot
8ca9f34270 Merge "mediawiki.mixins: Add '.transform-origin()' mixin" 2020-03-26 22:12:35 +00:00
Volker E
5e4680ab19 mediawiki.mixins: Add '.transform-origin()' mixin
Needed for example in I29ab0c35b89.

Change-Id: I1bd1c7a7e4c703b83e592106f468580199f8df72
2020-03-26 14:22:05 -07:00
jenkins-bot
015a265c0d Merge "Remove Parser::getDefaultPreprocessorClass(), deprecated in 1.34" 2020-03-26 21:20:45 +00:00
jenkins-bot
8f8bee78aa Merge "Deprecate Parser::enableOOUI()" 2020-03-26 21:20:38 +00:00
jenkins-bot
32f6e73183 Merge "Update OOUI to v0.37.1" 2020-03-26 21:04:29 +00:00
jenkins-bot
deb865be94 Merge "objectcache: add BagOStuff::setNewPreparedValues()" 2020-03-26 20:24:50 +00:00
jenkins-bot
4b27002f0b Merge "skin: Add $wgFooterLinkCacheExpiry and improve footer link preloading" 2020-03-26 20:23:39 +00:00
jenkins-bot
d72d0e5a65 Merge "block: avoid IN() DB query clause for ipb_address with redundant entries" 2020-03-26 20:21:08 +00:00
Aaron Schulz
bfef92cf98 objectcache: add BagOStuff::setNewPreparedValues()
This can be used by WANObjectCache or statsd metrics to estimate
the size of objects and network commands without having to do an
extra serialization round.

Change-Id: I7b1b787bba39a21e2e04262e77ee7ae24e88f8ca
2020-03-26 20:11:26 +00:00
C. Scott Ananian
37022ad343 Remove Parser::getDefaultPreprocessorClass(), deprecated in 1.34
Code search:
https://codesearch.wmflabs.org/search/?q=getDefaultPreprocessorClass&i=nope&files=&repos=

Bug: T204945
Change-Id: Ie7c0d8d9b61088efce9719878b3abcc9ed9ebc80
2020-03-26 16:10:34 -04:00
C. Scott Ananian
5468ab66ba Deprecate Parser::enableOOUI()
All existing uses in our codebase are to OutputPage::enableOOUI.

Further, the implementation here in Parser::enableOOUI calls
OutputPage::setupOOUI() without arguments, which means that the skin
and the page directionality are not initialized correctly.
(OutputPage::enableOOUI() does this correctly).  So even if anyone
*was* using Parser::enableOOUI... they shouldn't be.

Use $parser->getOutput()->enableOOUI() instead.

This was originally added in 2d50e28975 to
enable OOUI to be used from parser tags (T101666), but the current patches
for this (eg I29e876c768819413bf31499f067d545732e591b0) can just use
$parser->getOutput()->enableOOUI() instead.

Code search:
https://codesearch.wmflabs.org/search/?q=enableOOUI&i=nope&files=&repos=

Bug: T236809
Change-Id: I71be19c1d735fef5b781c68ef7ba47cafc37595d
2020-03-26 16:09:05 -04:00
Aaron Schulz
c6b700be8d skin: Add $wgFooterLinkCacheExpiry and improve footer link preloading
Change-Id: Ibb44867e690ef5eb6ee4187ecdebb92ebbd009a3
2020-03-26 20:08:53 +00:00
Aaron Schulz
264e5a4b7b block: avoid IN() DB query clause for ipb_address with redundant entries
When there is only one entry but it was found twice, the query became
'ipb_address IN (a, a)' instead of 'ipb_address=a'.

Change-Id: If6c49ad1502c1ba277fb83b64757fd16f0886093
2020-03-26 20:07:42 +00:00
jenkins-bot
7a65241c5b Merge "Display different errors for title vs file not found in MediaFileHandler" 2020-03-26 19:47:26 +00:00
jenkins-bot
26ac141f03 Merge "Add 1.31.7/1.33.3/1.34.1 to HISTORY" 2020-03-26 18:43:26 +00:00
Reedy
1ea6a0a18b Add 1.31.7/1.33.3/1.34.1 to HISTORY
Bug: T240397
Change-Id: I64e0d1cc9077debc570baebbceaca527aec1918d
2020-03-26 18:28:22 +00:00
jenkins-bot
93f8e2e1f7 Merge "exception: No longer try to send error page post-send on api.php" 2020-03-26 18:23:22 +00:00
sbassett
bbb7beab65 SECURITY: Better controls for logout interface buttons
* Adds data-mw attribute support within BaseTemplate->getPersonalTools()

* Adds data-mw="interface" for default logout button in
SkinTemplate->buildPersonalUrls()

* Adds the [data-mw="interface"] selector to the '#pt-logout a' click
handler added in 8f03391103.

Bug: T232932
Change-Id: I8e933badb77c89212603a36470ce655e30c137f0
2020-03-26 17:57:37 +00:00
Timo Tijhof
36e0e638a8 exception: No longer try to send error page post-send on api.php
For other endpoints this was already fixed, as all MWExceptionRenderer
logic checks headers_sent() before outputting headers.

For the MW_API condition, it was calling wfHttpError(), which in
turn unconditionally tried to send headers.

Fix this by removing use of wfHttpError(), and instead re-use the
existing logic for a minimal http error page. Do this by removing
the early condition and instead let if fall into the general
render methods, and then treat MW_API as a non-OutputPage scenario.

Bug: T225657
Change-Id: I38bbf8007078c290a2576ef177b789fab1d2059f
2020-03-26 17:53:27 +00:00
Bartosz Dziewoński
be02ebb993 SECURITY: jquery.makeCollapsible: Escape user-generated CSS selectors
Bug: T246602
Change-Id: Iea64a258499ab597b9a8900418a42162fdb5f391
2020-03-26 17:40:14 +00:00
Bill Pirkle
c50523f1fc Display different errors for title vs file not found in MediaFileHandler
In Core REST API MediaFileHandler, display a different error for
title not found vs file not found. Files may be unfindable even if
the title exists due to permission errors, or if they are missing
from the file system.

Bug: T238374
Change-Id: If49273b979291e284043f6251ad8d989a10defe1
2020-03-26 11:58:12 -05:00
jenkins-bot
38d55e8e67 Merge "Special:ChangeContentModel & Special:MovePage: Add a subtitle" 2020-03-26 15:47:32 +00:00
jenkins-bot
3c5f39b55d Merge "Add Inari Sami (smn) to Names.php" 2020-03-26 15:25:06 +00:00
jenkins-bot
f3222e56a2 Merge "MovePage: Remove pre-MCR code" 2020-03-26 15:06:56 +00:00
jenkins-bot
ee6e997266 Merge "Declare $wgUser to be deprecated in version 1.35" 2020-03-26 14:40:43 +00:00
Brad Jorsch
c81f992387 MovePage: Remove pre-MCR code
The code path updating rev_content_model on a page move wasn't flagged
with $wgMultiContentRevisionSchemaMigrationStage, so removing it was
missed in I1d9f5465.

Bug: T198557
Change-Id: Ibf3fe35112136393c69091fd02f8b433f53f6eb8
2020-03-26 10:23:20 -04:00
jenkins-bot
0de13c6125 Merge "Fix mismatching type hints in PHPDoc tags" 2020-03-26 13:35:31 +00:00
Fomafix
3dcb9d26a1 Add Inari Sami (smn) to Names.php
Autonym in lower case: anarâškielâ

https://iso639-3.sil.org/code/smn
https://www.ethnologue.com/language/smn

Also change the autonym of Southern Sami (sma) from upper case
(Åarjelsaemien) to lower case (åarjelsaemien) to be consistent to
langdb.yaml

Bug: T248299
Change-Id: I69f3322b1414a22dfa707792779d9d59cd7b837d
2020-03-26 14:01:52 +01:00
jenkins-bot
4bd153c1bc Merge "DefaultSettings: Improve docs for $wgPasswordDefault" 2020-03-26 11:35:24 +00:00
Translation updater bot
5d9e300534 Localisation updates from https://translatewiki.net.
Change-Id: I0d014483c6749b5c52ec24bc147dfd69f58194fc
2020-03-26 08:29:42 +01:00