Commit graph

2844 commits

Author SHA1 Message Date
jenkins-bot
69ae945e8d Merge "Update weblinks in comments from HTTP to HTTPS" 2016-11-08 21:32:00 +00:00
Fomafix
202f695f67 Update weblinks in comments from HTTP to HTTPS
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.

Also update some defect links.

Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
2016-11-07 15:24:46 +01:00
Kunal Mehta
91e5e41325 Disable magic links by default
And add release notes for all the magic links changes in 1.28.

Bug: T147536
Change-Id: I66b2c4424b17cc86bbd7339de588f1c00cd2f18d
2016-11-04 02:27:30 +00:00
Brad Jorsch
125b464ab2 Add a grant for viewing restricted log entries
In core this holds the 'suppressionlog' right. SpamBlacklist and
TitleBlacklist would add their permissions here as well.

Bug: T149235
Change-Id: I8e2304e7b6f2af0c3d21d7d7390e4979b8eaee39
2016-10-26 15:27:44 -04:00
Chad Horohoe
b6c3fc93e9 Bump version number to 1.29.0-alpha for 1.29 development cycle
Branch point was dc0f9b3a3a

The following commits missed the branch point and should probably
be backported because master reports them as 1.28
 - 4290f686c0
 - 81698d4c16
 - 40da8bf039
 - 95db9833dd
 - 7bd97758f7

Change-Id: I51562ba357b5533500ef9dd1e29107dd05cc9e1e
2016-10-25 16:17:48 -07:00
Bryan Davis
bc6e4d0082 wgRateLimits: Add configuration option to ignore 'noratelimit' right
It may be reasonable to ignore the 'noratelimit' right granted to a user
when perfuming some rate limit checks. As an example, a rate limit check
on failed authentication attempts should not be bypassed.

Add an optional '&can-bypass' configuration option for each
$wgRateLimits action that can be set to false to disable checking
User::isPingLimitable(). This bypasses both 'noratelimit' and
$wgRateLimitsExcludedIPs exclusions.

Depends-On: Iacdd1719d5f08eca91de0a35c0042ffee2136f34
Change-Id: Ia3add8bbbab0307f036e9b77e752c382da3a0d04
2016-10-04 05:38:10 +00:00
Reedy
c214c9a952 Detect/use APCu properly
In PHP 5.5 and above, userland APC caching moved to an extension

Bug: T140587
Change-Id: Ie0871776cd7e67838471a4fe95451cf4164079b7
2016-10-01 23:07:47 +01:00
Aaron Schulz
1fd6edb0d1 Lower $wgTrxProfilerLimits for JobRunner a bit
Jobs should always use query batching.

Change-Id: Iddbcc32b44e6c71feb66e2f52afb20e824e6eb72
2016-09-27 23:05:38 +00:00
Aaron Schulz
616fabe05a Move FileBackendMultiWrite to /libs
Change-Id: I8079693a62db390028cd9f72b2bd7a81ae1164c3
2016-09-23 20:19:11 +00:00
jenkins-bot
711fad668b Merge "Inject "srvCache" and local DB connections into LockManagerDB" 2016-09-23 05:13:48 +00:00
cenarium
380ab62718 Support multiple limits and arbitrary periods in account creation throttle
This adds support for multiple count-per-period limits and arbitrary
period durations in the AuthManager account creation throttle in the
wiki settings. The $wgAccountCreationThrottle config variable becomes
an array like $wgPasswordAttemptThrottle.

Bug: T146290
Change-Id: Iea182a92a1199b0ce7103ab9ae24f1c87b01985c
2016-09-22 12:59:53 +02:00
Aaron Schulz
a11293c368 Fix broken $wgExternalServers example setting
Just reference $wgDBservers instead, which uses the same format.

Change-Id: Iaa32cb067f9487b459925310ac4c52efe3f4a3f1
2016-09-19 15:16:29 -07:00
Aaron Schulz
0cf832a339 Inject "srvCache" and local DB connections into LockManagerDB
* Also simplified the srvCache variable usage to be unconditional.
* The wfRandomString() call has also been replaced.

Change-Id: I17e83b17ec549906ee200bbe9eb2f0b151423e26
2016-09-19 01:30:17 -07:00
Aaron Schulz
5bc9b990ac Cleanups to DatabaseMysqlBase
* Avoid global methods
* Inject global variables
* Remove $wgAllDBsAreLocalhost hack

Change-Id: I54b23654def1f83518764ad697434aebfc6cef73
2016-09-17 06:01:19 +00:00
Kunal Mehta
78debba3aa Parser: Allow disabling magic link functionality
The magic link functionality is "old backwards-compatibility baggage"
that we probably want to get rid of eventually. The first step to doing
so would be making it configurable and allowing it to be turned off on
wikis that don't use it.

This adds each of the 3 magic link types as individual parser options,
which can be controlled by the $wgEnableMagicLinks setting.

Additionally, wfEscapeWikiText() was updated to only escape enabled
magic link types.

Bug: T47942
Change-Id: If63965f31d17da4b864510146e0018da1cae188c
2016-09-12 22:00:05 -07:00
Aaron Schulz
65b47d03d1 Tweak $wgTrxProfilerLimits to lower noise a bit
Change-Id: I22ae7a5c2ba5f39007019e47ea0dff17a4cc971a
2016-09-12 19:13:38 -07:00
jenkins-bot
c64d672f59 Merge "Make $wgRevisionCacheExpiry default to one week" 2016-09-09 10:37:49 +00:00
Aaron Schulz
37b08163ea Make $wgRevisionCacheExpiry default to one week
* If CACHE_DB is used, it will not use the cache however.
* If persistent cache is disabled, at least maintain the
  process caching.

Change-Id: I23b455ef46f27c313bb9573f69723b1436b2d584
2016-09-08 19:56:24 -07:00
Kunal Mehta
664baa2b5e Add rate limits for changing a page's content model
The defaults are set to the same value as page moves.

Change-Id: I72d6c35ecda475101c1c909715e4ba693dd214f6
2016-09-07 18:38:19 -07:00
James D. Forrester
960e4d09ca Documentation: Replace misuse of 'later' when we meant 'latter'
Change-Id: I01bfdb8e0bfaa132533732873f7c840cea7935eb
2016-09-07 13:13:42 -07:00
Kunal Mehta
b43ac35351 Grant 'editcontentmodel' permission to 'user' group
Bug: T85847
Change-Id: Iad834e757ac6f37ad64ac9e93afe93160aabc842
2016-09-07 11:03:29 -07:00
jenkins-bot
00ac2882bb Merge "Turn off duplicate key gets for ReplicatedBagOStuff" 2016-09-06 18:18:07 +00:00
Aaron Schulz
950cf6016c Rename DB_SLAVE constant to DB_REPLICA
This is more consistent with LoadBalancer, modern, and inclusive
of master/master mysql, NDB cluster, and MariaDB galera cluster.

The old constant is an alias now.

Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
2016-09-05 22:55:53 -07:00
Aaron Schulz
45adeddf1b Turn off duplicate key gets for ReplicatedBagOStuff
This is used as the main stash by default, which is not a
performance cache but a stash for ephemeral values typically.

Change-Id: Ie3740c0387f36a3f9b2d8d7d3b4e04ee9238ab1a
2016-09-05 14:23:41 -07:00
Aaron Schulz
16266edff3 Change "slave" => "replica DB" in /includes
Change-Id: Icb716219c9335ff8fa447b1733d04b71d9712bf9
2016-09-05 21:01:01 +00:00
jenkins-bot
a303296f27 Merge "Make statsd sampling rates configurable" 2016-09-05 08:52:54 +00:00
Aaron Schulz
52d2ebb30a Make insertSelect() do two separate queries in non-CLI mode
This avoids slave lag and makes query time account easier.
It also avoids table-level autoinc locking and slave drift
with statement-based replication in some setups.

Also refactored the use of $wgCommandLine mode in
DatabaseBase slightly, so that it can be injected.

Change-Id: I2dba6024ecf32c9ee24a3080cce3b02568c1458b
2016-08-31 17:21:30 -07:00
James D. Forrester
4c9e3b3751 Rename EditButtonPublishNotSave to EditSubmitButtonLabelPublish
Per legoktm.

Change-Id: I4fbe54876095378a476399bf5e336c8df3e91e14
2016-08-29 10:55:11 -07:00
jenkins-bot
e14ac4bcb8 Merge "Enable $wgResourceLoaderStorageEnabled by default" 2016-08-27 19:22:27 +00:00
Brian Wolff
d84479c4cd Add urls from various adware to the CSP false positive list
URLs are based on spam that comes into the Wikimedia log files,
based on testing on elwiki.

Change-Id: Iee86633abaae86c55764365042681bda1f2304be
2016-08-25 22:52:28 +00:00
Brian Wolff
85eed51f94 Enable $wgResourceLoaderStorageEnabled by default
Been in use on Wikipedia for a long time, no longer experimental.

Change-Id: I3dde225a07e25f9dcda1a651dfb5a7b2d0833eb1
2016-08-24 16:18:03 +00:00
jenkins-bot
fbce940836 Merge "VirtualRESTServiceClient management cleanups" 2016-08-24 03:30:55 +00:00
Aaron Schulz
64b8debbff VirtualRESTServiceClient management cleanups
* Add getVirtualRESTServiceClient() to MediaWikiServices.
* Support auto-mounting services that are usable by the
  main MediaWikiServices instance.
* Support lazy-loading in mount(), where only class/args
  are set until the service is needed. This avoids excess
  overhead.

Change-Id: I5c22be59664b3f5716c957e2c3d7c8e70d5fdc6c
2016-08-24 03:21:28 +00:00
jenkins-bot
47437e0653 Merge "EditPage: Allow the 'save' button's label to be 'publish' for public wikis" 2016-08-24 00:17:38 +00:00
Aaron Schulz
6a9e507dc5 Reduce problems caused by $wgRunJobsAsync
* Use getCanonicalURL() to avoid links with the wrong host (e.g.
  when it is virtual) and to avoid getting redirects.
* Also disable this setting when post-send execution is already
  available, by default.
* Bump the socket timeout slightly.

Bug: T107290
Bug: T68485
Change-Id: I56c43193fa6583cc0c8209ff59cf20c986a799a3
2016-08-22 23:26:50 -07:00
jenkins-bot
61febc7e6c Merge "Pingback: Tweak docs a tiny bit to point to mw.org better" 2016-08-23 05:09:43 +00:00
Chad Horohoe
6df8fce796 Unset weird ancient WMF-specific shared upload settings
They won't work for anyone, not even WMF

Change-Id: I520f684fe833f0e1a9dc5b56d83366cb909fd480
2016-08-22 10:15:57 -07:00
Chad Horohoe
26b01331e3 Pingback: Tweak docs a tiny bit to point to mw.org better
Change-Id: Ia01380d6bb20cfb22b6cc3717ce530df87e0d42b
2016-08-22 10:14:28 -07:00
jenkins-bot
0aa0a68aa9 Merge "Add grant for access to private information" 2016-08-15 20:25:56 +00:00
Matthew Flaschen
8d1286ec0f DefaultSettings: Clarify enotif documentation
Change-Id: I4cc5ff94c7000b4c2ed584e49a590065f8d5724c
2016-08-12 21:53:31 +00:00
Aaron Schulz
c2ce6a1b60 Require POST for action=purge in PurgeAction
For the index.php end point, POSTs do not need a token.

This avoids cross-DC writes in active/active DC setups and
avoids DB writes that can be caused by just accidentally
following a link.

There are no links to action=purge by default in MediaWiki.
User scripts that create purge links will continue to work.
However these links will now point to a confirmation form.
To preserve the immediate-purge-redirect effect, these
scripts should be updated to use the API instead.

Bug: T135170
Change-Id: I5749ff470d99c5e3f22e05ff6856394cc05a0f48
2016-08-10 18:33:55 -07:00
Gergő Tisza
854a462dc0 Remove $wgDisableAuthManager
Change-Id: I2b2c9693a275fcc026916bd97f303e7a5c8df341
2016-08-09 23:00:27 +00:00
Darian Anthony Patrick
8613fdfe02 Add grant for access to private information
Add 'viewmyprivateinfo' user right, which controls
access to information like email and real name.

Bug: T68493
Change-Id: I9f7de8ad77a1592707695cb5c1983b8f4cace1b6
2016-08-08 17:02:31 -07:00
jenkins-bot
1cdd4682ed Merge "Move MediaHandler defaults out of global scope" 2016-08-04 09:30:53 +00:00
Kunal Mehta
1b1b3cdb54 Move MediaHandler defaults out of global scope
The defaults that were in $wgMediaHandlers are now listed in
MediaHandlerFactory.

The main advantage of doing this is we get O(1) replacement when
extensions set a media handler in their extension.json.

Bug: T141305
Change-Id: I05771a673837ab8d6331eedc24eb707be7f3a250
2016-08-03 16:47:46 -07:00
Bartosz Dziewoński
a49b3216fc Canonicalise '@deprecated since' doc comments
Change-Id: I440041512feb47a998efb45e76e3fd00e0655752
2016-08-02 22:21:57 +00:00
Bartosz Dziewoński
ea43031b39 Improve how slashes are stripped from filenames
* Add slash and backslash ('/' and '\') to $wgIllegalFileChars.
* Replace illegal chars before removing paths in wfStripIllegalFilenameChars().

This way users trying to upload a file with slashes in the name will
get a better filename suggestion (e.g. for 'Foo part 1/3.jpg', you
previously got '3.jpg', now you'll get 'Foo part 1-3.jpg'). Uploading
tools that don't special-case slashes will also behave better.

Change-Id: Ib78f48a5f8c92e8ab2dc773ea6789b96b3662177
2016-07-25 00:24:36 +02:00
Ori Livneh
f181cdec56 Add option for sharing info about this MediaWiki install via pingback
When $wgPingback is true, MediaWiki will periodically ping
https://www.mediawiki.org/beacon with basic information about the local
MediaWiki installation.  This data includes, for example, the type of system,
PHP version, and chosen database backend.

The pingback is sent via a deferred (post-send) update whenever $wgVersion
changes, using the updatelog table to ensure we don't send duplicate pingbacks.
A database lock ensures only one thread attempts to send the pingback, and a
cache key throttles attempts to no more than once per hour.

$wgPingback is false by default. The web installer has a checkbox for
controlling this option, and it is checked by default. This nudges new installs
to turn on pingbacks, but does not sneak this decision past sysops of existing
installs.

Change-Id: Ie43a6b46a07ebd9ccc1b9c3001f2ea02435d826b
2016-07-21 21:00:28 +00:00
jenkins-bot
df5e7c3aa0 Merge "Truncate gallery caption filenames with CSS" 2016-07-18 23:39:30 +00:00
Brion Vibber
3b5f60f2c8 Remove old Esperanto character conversion support
Deletes LanguageEo.php class which only had remains of the server-side
character conversion (sx <-> ŝ, etc). This is being obsoleted in favor
of client-side IMEs provided by UniversalLanguageSelector extension.

Removes deprecated $wgEditEncoding, which was only used for this.

Turns Language::recodeInput() and Language::recordForEdit() into no-ops
for any old or extension code that happened to still use them.

Bug: T62677
Change-Id: Ib647353538d258dee941f2f7c571191060bc9c7d
2016-07-18 19:20:49 +00:00