Commit graph

3322 commits

Author SHA1 Message Date
DannyS712
f55e279d8f Follow-up 94582698c3: Fix references to injection.txt, now Injection.md
Change-Id: Ia7e653e0af0aca527e3e7c7625b669a10fc6d500
2019-12-14 20:19:56 +00:00
Timo Tijhof
15dbbe324c API: Deprecate wgEnableOpenSearchSuggest and opensearch+suggest parameter
The OpenSearch and prefixsearch APIs are always on for external use.

This internal parameter and feature flag was used as emergency switch
when the feature was still new, as a way to selectively ignore queries
from our own frontend code if we decided to turn the feature off.

At the time, there was also the $wgEnableMWSuggest configuration variable.
The idea being that if the JS is undeployed, it may still be cached in the
HTML and in some browsers. The $wgEnableOpenSearchSuggest variable allowed
the MW servers to identify those requests and return empty array without
any further DB load. Thus returning an empty array, which the frontend
at the time (mwsuggest.js) treated the same way visually as if the suggestion
feature didn't exist.

Since then:
* $wgEnableMWSuggest was removed in MediaWiki 1.20. The search suggestions
  in Vector and other skins are now always on.
* The "Disable search suggestions" user preference was removed
  in MediaWiki 1.23 (T54812).

Proposing to remove this additional complexity.

Change-Id: Iec572012de171d02871b8dc3207d2b34d17bf9ef
2019-12-13 18:11:43 +00:00
jenkins-bot
8d7c1516c8 Merge "Set MCR migration stage to SCHEMA_COMPAT_NEW." 2019-11-18 15:56:54 +00:00
daniel
1a917bab4c Set MCR migration stage to SCHEMA_COMPAT_NEW.
This disables writing to the old schema in DefaultSettings.php.

Bug: T231673
Change-Id: I799bfb76c10fd0c0dc791e7380fce0159d81c2d3
2019-11-18 15:25:39 +00:00
jenkins-bot
f5a708da3b Merge "Remove $wgDBWindowsAuthentication" 2019-11-10 15:47:17 +00:00
mainframe98
1aa6cdab0e Remove $wgDBWindowsAuthentication
Follow up to 807d793, this setting is unused.

Bug: T230418
Change-Id: I3e27af725ec2f8f206e068f140a9cfdaafa523c7
2019-11-10 16:00:43 +01:00
Ammar Abdulhamid
4d55fa08dd Remove jquery.tabIndex module
This module was deprecated in I8e1b43a

Bug: T234581
Change-Id: I67998a0b2f49dfeb7921b6fae08b380a68c7674d
2019-11-08 17:56:19 +00:00
Fomafix
b14faae85b Use @since 1.35 instead of @since 1.34 for wgInterlanguageLinkCodeMap
This is a followup to change c919b04f53.

Change-Id: I701a41cf854b4f2ad6312fec1e01c80b341ffe81
2019-11-08 11:49:46 +01:00
Niklas Laxström
c919b04f53 Add $wgInterlanguageLinkCodeMap
This allows us to use correct names in Names.php without needing to
change the domain codes.

Bug: T174160
Change-Id: I98d2b453022f2de8a32b5d55bac91f3c317e4310
2019-11-07 08:27:36 +00:00
Timo Tijhof
0da1ecfd89 profiler: Remove ProfilerOutputDb and profileinfo.php entry point
Bug: T231366
Change-Id: I211c8192200d9af00914f9847608a6daf2898f91
2019-11-06 15:28:00 -05:00
Cormac Parle
c4eae0dad4 Search: Provide new preference to control redirects on search matches
To avoid preference bloat, this preference is hidden unless the new
sysadmin config $wgSearchMatchRedirectPreference is set.

Bug: T235263
Change-Id: Ic16f53a4e6ddb6da071d63cd5da28d937d4692c8
2019-11-06 15:37:56 +00:00
Brad Jorsch
f3058c81b9 Add $wgDiffEngine
The immediate use case is for testing, where some tests need to use the
PHP implementation even when wikidiff2 is installed.

Bug: T237049
Change-Id: I41dc4c0933429065d7638f518ec31f0a056afc41
2019-11-05 10:38:52 -05:00
DannyS712
ce99c5f3aa Remove $wgSysopEmailBans, deprecated in 1.34
Bug: T233116
Change-Id: I72e257454692b29bfcbf4796f457858fc61b93d8
2019-11-01 02:46:45 +00:00
Kunal Mehta
03078991c4 Disable $wgServer autodetection to prevent cache poisoning attacks
Since MediaWiki 1.18, $wgServer has been automatically set by the web installer
when it generates LocalSettings.php, so this shouldn't be an issue for most
wikis. The CLI installer now supports a --server optional parameter to
specify $wgServer, otherwise it'll be set to 'http://localhost' by default.

Users will see a fatal error pointing them to the on-wiki $wgServer
documentation that I've updated as well.

Originally this functionality was slated for removal in 1.20, but now is
just a good time as any. It also calls into other parts of MediaWiki before
most things are initialized, making it difficult to librarize some code.

Bug: T30798
Bug: T232931
Change-Id: Ia5d616e7fafbab01655067c24c5a3a073b254f21
2019-10-30 15:49:41 +11:00
jenkins-bot
27f3609127 Merge "Document wgEnablePartialBlocks usage in a SiteConfiguration object" 2019-10-29 20:00:53 +00:00
jenkins-bot
1c6263f49d Merge "Remove deprecated wikidiff2 configuration" 2019-10-22 12:04:58 +00:00
Ammar Abdulhamid
0454b34c4d resourceloader: Simplify $wgResourceLoaderMaxage config
Remove support for the 'client' and 'server' subkeys.

Bug: T235314
Change-Id: Ibeb2404b0f7dc8a9198e73344d54a3cb0176de08
2019-10-19 21:28:58 +01:00
jenkins-bot
4b6468ba66 Merge "rdbms: Restore debug toolbar "Queries" feature" 2019-10-15 18:29:02 +00:00
David Barratt
8d195b08df
Document wgEnablePartialBlocks usage in a SiteConfiguration object
When used in a SiteConfiguration object, the wgEnablePartialBlocks cannot
be used with a suffix or a tag.

Change-Id: I5e8c5087bb4d279051f429a4b99ed7c46e0bc85c
2019-10-11 16:56:06 -04:00
Timo Tijhof
2e404a2582 rdbms: Restore debug toolbar "Queries" feature
This broke after e0cc49ce39, due to the field 'master'
being removed from the log context. The LegacyLogger logic
forwarding these messages to MWDebug (for the debug toolbar)
however, was dependant on.

Users of debug toolbar experienced a silent failure because the
logic in question is very tolerant of missing fields. This is
because it uses those fields to distinguish the 'sql' messages
from channel=DBQuery from other messages in the same channel.
Making that less fragile is outside the scope of this commit.

This commit:

* Restore the basic functionality by making sure MWDebug::query()
  gets called again for DBQuery messages.

* Remove the code relating to the 'master' field as this no longer
  exists in RDBMS. It also wasn't used anywhere (to be used,
  it would need to be read by mediawiki.debug/debug.js).

* Remove unexpanded "{method}" and "{runtime}" noise in the debug
  toolbar text. This was introduced by he conversion to PSR-3
  logging.. These fields are already rendered separately by
  the toolbar and should not be part of the "SQL" column.
  To do this, we need to log the $sql bit as its own key, so
  I've made this a context field as well.

* Reduce the condition logic in LegacyLogger to only looking for
  'DBQuery' and 'sql'. This way, if it breaks again it will
  still call the logic within and emit E_NOTICE instead, which
  would help detect the issue (and still fallback to at least
  showing the queries). Unlike before this commit where it took
  quite some time to figure out why it wasn't working.

* The above fixes still weren't enough to get queries to show
  up in the Debug toolbar for me. Turns out, this was because
  my local setup (mediawiki-docker-dev) uses a master-replica
  set up. The setup doesn't use any custom LBFactory config,
  just plain $wgDBservers. The logic for turning these plain
  settings into LBFactory (in MWLBFactory.php) does kick in,
  and does run (unlike if I had custom wgLBFactoryConf).
  But, the DBO_DEBUG flag didn't make it through because of
  the += operator preferring any pre-existing value my setup
  has, which is just `DBO_DEFAULT`.
  Merging 'flags' keys seems unsafe in general, but adding
  DBO_DEBUG based on $wgDebugDumpSql seems innocent and doesn't
  affect other behaviour (it's a case of DWIM).

Bug: T231742
Change-Id: I122bb1a65620a7ae4e1943136c975b63524a5111
2019-10-11 20:04:05 +01:00
Adam Wight
87f0f1d88a Remove deprecated wikidiff2 configuration
Migration instructions were already included in RELEASE-NOTES-1.34

Bug: T194272
Change-Id: I7f8cca7617b764eede0435c0384ee70d4933cfb7
2019-10-09 15:57:56 +02:00
jenkins-bot
cefd7c922f Merge "Session: Remove mcrypt support, dropped from PHP 7.2" 2019-10-08 04:03:46 +00:00
Max Semenik
2816b4f7da Session: Remove mcrypt support, dropped from PHP 7.2
Change-Id: I46d04f4b31730ee1b368f2c2646638fa59234f66
2019-10-07 16:15:15 -07:00
Aryeh Gregor
043d88f680 Make LocalisationCache a service
This removes Language::$dataCache without deprecation, because 1) I
don't know of a way to properly simulate it in the new paradigm, and 2)
I found no direct access to the member outside of the Language and
LanguageTest classes.

An earlier version of this patch (e4468a1d6b) had to be reverted
because of a massive slowdown on test runs. Based on some local testing,
this should fix the problem. Running all tests in languages is slowed
down by only around 20% instead of a factor of five, and memory usage is
actually reduced greatly (~350 MB -> ~200 MB). The slowdown is still not
great, but I assume it's par for the course for converting things to
services and is acceptable. If not, I can try to optimize further.

Bug: T231220
Bug: T231198
Bug: T231200
Bug: T201405
Change-Id: Ieadbd820379a006d8ad2d2e4a1e96241e172ec5a
2019-10-07 13:18:47 -07:00
Lucas Werkmeister
61c70d2de3 Fix documentation of $wgMainStash option
'db' is not a valid value:

> UnexpectedValueException: Cache type "db" is not present in $wgObjectCaches. in /var/www/html/wiki1/includes/ServiceWiring.php on line 318

Instead, one of the cache types set up in $wgObjectCaches must be used.

Change-Id: Id2cdf1f42dc552d21871af73abf8e87d0585706e
2019-10-07 20:08:51 +02:00
Max Semenik
06a275f48e Remove more HHVM hacks
Change-Id: I6bd298ef3b887173b87004ee055be2a4f6ea5f11
2019-10-06 10:16:09 +00:00
jenkins-bot
ec440ce1bf Merge "Make max-age configurable for logged-out users" 2019-10-03 22:13:50 +00:00
Gilles Dubuc
ea9cb5ceaa Make max-age configurable for logged-out users
For small wikis. When a CDN is present, the value is
overwritten by the CDN.

Bug: T231184
Change-Id: I45a53571d0f5f6316eb97b396c18c0b224586526
2019-10-03 21:59:10 +00:00
James D. Forrester
23eaa5aa95 Prepare for REL1_34 cut, labelling master as 1.35-alpha
Change-Id: Iae024da81a3808a58e17af2278e104abbcd3dd1e
2019-09-30 10:19:58 -07:00
Umherirrender
9a8a33bd0f Add a run mode to $wgDisableQueryPageUpdate
The run mode is used to show a different message on the special page,
instead of the current one "Updates for this page are currently
disabled. Data here will not presently be refreshed." even the data gets
updated with a different cron job.

Bug: T78711
Change-Id: Ib63d16bfea477dec43323b39671cc068530e2f0b
2019-09-26 22:33:53 +00:00
Niklas Laxström
2830ba4499 Mark $wgMainPageIsDomainRoot as experimental
Change-Id: I328c1022aec8918cbc5b4ee50de3d1dbe5586cfd
2019-09-24 08:53:19 +02:00
jenkins-bot
9e8439e79d Merge "Add config for serving main Page from the domain root" 2019-09-23 15:28:03 +00:00
Amir Sarabadani
a5deeac58c Add config for serving main Page from the domain root
Bug: T120085
Change-Id: If2d82340ec58888a0bac96924ab63456b6d480fb
2019-09-23 11:55:59 +02:00
Thalia
ca7869174f Improve documentation for the MinimumPasswordLengthToLogin policy
Bug: T233119
Change-Id: I2d0fa6f7116b407cbf62ad93da73d0800c9d14f9
2019-09-17 20:41:23 +01:00
DannyS712
3a2c7d1b5d Deprecate $wgSysopEmailBans
Bug: T232169
Change-Id: Iba2493eb2f49d32c5aa1b4da53c9c221847fb125
2019-09-17 08:23:04 +00:00
Thalia
043e1d2dbe Update old URLs in DefaultSettings related to Squid caching
Change-Id: Ic94fd638a80fcdc74f42c726f2e2e256b8f0c04d
2019-09-14 22:40:33 +01:00
Brad Jorsch
165d3cc50b Deprecate $wgContentHandlerUseDB
This was a "wait for DB schema change" feature flag that stuck around
for far too long.

Also of note is that setting $wgMultiContentRevisionSchemaMigrationStage
above SCHEMA_COMPAT_OLD, which has been the default since MW 1.32, will
already raise an exception if this is false.

Bug: T148137
Change-Id: I9a234fc55336660e9f24cac81db88a945348a1a5
2019-09-10 15:04:26 -04:00
jenkins-bot
e9daa066fe Merge "Add a preference to require email for password resets" 2019-09-10 08:41:00 +00:00
Max Semenik
d7049bc973 Add a preference to require email for password resets
The actual functonality will come in a later commit.

Bug: T231495
Change-Id: I9977b0d51a2b89b79c199bc4423f123e581e2a2f
2019-09-09 12:11:46 -07:00
Brad Jorsch
c29909e59f Mostly drop old pre-actor user schemas
This removes most of the pre-actor user and user_text columns, and the
$wgActorTableSchemaMigrationStage setting that used to determine
whether the columns were used.

rev_user and rev_user_text remain in the code, as on Wikimedia wikis the
revision table is too large to alter at this time. A future change will
combine that with the removal of rev_comment, rev_content_model, and
rev_content_format (and the addition of rev_comment_id and rev_actor).

ActorMigration's constructor continues to take a $stage parameter, and
continues to have the logic for handling it, for the benefit of
extensions that might need their own migration process. Code using
ActorMigration for accessing the core fields should be updated to use
the new actor fields directly. That will be done for in a followup.

Bug: T188327
Change-Id: Id35544b879af1cd708f3efd303fce8d9a1b9eb02
2019-09-09 11:38:36 -04:00
Timo Tijhof
cd6707ca18 Remove support for wgUseESI
Experimental feature deprecated since 1.33 (d63684a064).

Change-Id: I9bab4ad1cd1f2c80a3dfcccdf99ed011c9c8a440
2019-09-08 05:11:57 +01:00
Reedy
29c8d84c47 Prevent all users from having a password in the blacklist
Bug: T151425
Change-Id: I8d8f738176a47ccc5bd0a9eeac3a3385c3809088
2019-09-05 16:36:19 -07:00
jenkins-bot
dcbff83dfb Merge "Enable $wgCookieSetOnAutoblock and $wgCookieSetOnIpBlock by default" 2019-09-05 22:34:22 +00:00
Dayllan Maza
264b81875f Enable $wgCookieSetOnAutoblock and $wgCookieSetOnIpBlock by default
Bug: T191922
Change-Id: I339f9a23c7f19be97d0b0a1abf0242fdbb6ac891
2019-09-05 17:44:28 -04:00
jenkins-bot
b6737798b8 Merge "resourceloader: Drop support for low Suhosin 'max_value_length' values" 2019-09-04 21:53:44 +00:00
Timo Tijhof
3ac385a0c3 resourceloader: Drop support for low Suhosin 'max_value_length' values
Move the default of 2000 to DefaultSettings.php, and promote
the installer warning to a hard value.

Recommend that the setting be disabled, or increased to 5000.

Change-Id: Ifb0aadf8b52fd2d5c2a32f55e38eaa9c2600dfb5
2019-09-04 14:25:04 -07:00
Daimona Eaytoy
5eac6d131c Unsuppress more phan issues (part 3)
Bug: T231636
Depends-On: I78354bf5f0c831108c8f606e50c87cf6bc00d8bd
Change-Id: I58e67c2b38389df874438deada4239510d21654f
2019-08-31 16:38:55 +00:00
jenkins-bot
5264862bc1 Merge "Actually assign suppression-related rights to 'suppress' group" 2019-08-30 17:00:46 +00:00
Aaron Schulz
f78e39d3d7 Remove $wgMemCachedDebug
Change-Id: I98380ac1cb66e33719b4836410311aea3513115c
2019-08-29 17:16:31 +00:00
jenkins-bot
1f719d58d8 Merge "LockManagerGroup tweaks" 2019-08-28 08:44:18 +00:00