Commit graph

1296 commits

Author SHA1 Message Date
jenkins-bot 8d844ef647 Merge "Sanify handling of array keys" 2018-02-10 09:21:31 +00:00
Brad Jorsch 6c69cd2ddf SECURITY: Reduce precision on os.clock() to mitigate timing attacks
While there is currently no demonstrated vulnerability, this provides
additional hardening against SPECTRE-like attacks, and any potential
future timing attacks.

Bug: T184156
Change-Id: I2b5cc177bded1a9b5600d77116e67817841204be
2018-02-09 15:24:02 -08:00
jenkins-bot ca1c84f928 Merge "LuaStandalone: Improve passing of numeric values" 2018-02-09 23:15:57 +00:00
jenkins-bot 5947ee9700 Merge "LuaStandalone: Properly handle serialization errors" 2018-02-09 23:14:39 +00:00
jenkins-bot e5b57f10ee Merge "Invalidate slow function call cache to avoid warnings" 2018-02-09 19:00:32 +00:00
Kunal Mehta 03d256ffac Invalidate slow function call cache to avoid warnings
The serialization format of PSquare changed so that trying to unserialize
an older version of the class results in data corruption, causing
"Division by zero" warnings.

Bug: T186839
Change-Id: Ie5d68d98402d0ab74b800c874ae50bc36e23e2bf
2018-02-09 10:50:40 -08:00
Translation updater bot 05501a4bb9 Localisation updates from https://translatewiki.net.
Change-Id: Ifad5abe4a04ca6707e77f67b472181987d7fd14b
2018-02-09 09:41:15 +01:00
Brad Jorsch 790311faa3 Sanify handling of array keys
When passing an array from PHP to Lua, stringify integer array keys
beyond the range a lua_Number can represent.

When passing a table from Lua to PHP,
* Avoid exponential encoding for integer keys beyond 1e14, so Zend PHP
  will interpret them as integers.
* Always encode integer keys as integers, so HHVM will interpret them as
  integers.
* Detect collisions, e.g. { [0] = 'foo', ["0"] = 'bar' }

Bug: T186240
Change-Id: I078068ed57df078248a307608381614bdfc70801
2018-02-06 17:13:20 -05:00
Brad Jorsch 9aca31681a LuaStandalone: Improve passing of numeric values
For integers from Lua to PHP, make sure they won't use exponential
notation that will confuse unserialize(), and pass the integer size from
PHP so Lua can know which numbers are representable as integers.

For doubles in both directions, increase the precision to avoid
truncation of the least significant bits.

Change-Id: Icfaff71cab0ee1aac04acf752d108049b5569380
2018-02-06 16:54:52 -05:00
Brad Jorsch 2a70e8b3f1 LuaStandalone: Properly handle serialization errors
When we're making a call from Lua to PHP, serialization errors should be
propagated to whatever in Lua made the call. That works fine.

But when we're returning data in response to a call from PHP, if there's
a serialization error we need to catch it and tell PHP about it.
Otherwise PHP just gets a useless "the interpreter exited".

Change-Id: Iaac498fa2e486631d38e2366977b360140756519
2018-02-06 15:53:40 -05:00
Translation updater bot c3f6e81839 Localisation updates from https://translatewiki.net.
Change-Id: I3280b59090f744a3b80143c9bd395ff55061dc7e
2018-02-05 22:37:00 +01:00
jenkins-bot 63f169cd82 Merge "build: Update linters" 2018-02-04 23:25:41 +00:00
Ed Sanders f03a32f6f8 build: Update linters
Change-Id: Iec64688e03c6efe81e3f5e4e5809290a1789bcd0
2018-02-04 22:10:26 +00:00
Translation updater bot 936aaa89a2 Localisation updates from https://translatewiki.net.
Change-Id: Id93fdbea42d709522476d2ad7af7932aacdba550
2018-02-04 22:44:02 +01:00
zoranzoki21 e41a3dc368 Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: I2b5941d2dcee3a998b3c1ece7dd4a6b36cc1e9c9
2018-02-03 17:23:40 +01:00
Kunal Mehta ec7b1b05cf Fix Scribunto_LuaStandaloneInterpreterTest::testGetStatus on 7.1+
The extraneous whitespace in the return value from wfShellExec() causes
multiplying $size to trigger the newly introduced "A non well formed
numeric value encountered" warning in PHP 7.1+.

Work around that by using trim() to get rid of the whitespace.

Bug: T186299
Change-Id: I3d47ef6cc7fb99b4d4840dc847d150c3939ee535
2018-02-01 21:08:32 -08:00
Tulsi Bhagat 0f213156e5 Update the Module & Module talk namespace in Nepali Wikipedia
Bug: T186187
Change-Id: Ic0008c221f0e1449b913c4c69437cce828ed9adf
2018-02-01 09:40:22 +00:00
Translation updater bot 452476d3d0 Localisation updates from https://translatewiki.net.
Change-Id: I8b5e5480802969d69b9d2fa9863fd3b048fafb18
2018-01-31 22:20:20 +01:00
Translation updater bot abea26e38d Localisation updates from https://translatewiki.net.
Change-Id: Iea7a1b9e4e4a6f28aa26990efe687c0aa6ab77e9
2018-01-29 22:20:35 +01:00
Jayprakash12345 0f285d0516 Use SPDX 3.0 license identifier
Bug: T183858
Change-Id: I405b1e6744dac319c1fb519a85e8a7a92978cd9a
2018-01-29 06:00:10 +00:00
Translation updater bot 4f2c6220e7 Localisation updates from https://translatewiki.net.
Change-Id: I3a9aa805d2907dcf7d4c0d100ff7e9bf34b92cbd
2018-01-24 22:21:01 +01:00
Translation updater bot 5267e81c95 Localisation updates from https://translatewiki.net.
Change-Id: I4dea3ed42b3112e7435aeb43a89edff4fa4e2de9
2018-01-21 22:17:22 +01:00
Reedy 41839c1b7a Update RunningStat use statement
Bug: T182273
Change-Id: Ida16060a6f0f125a0f5dabdb446b94b93db80cd1
2018-01-21 04:42:48 +00:00
Translation updater bot 747718e540 Localisation updates from https://translatewiki.net.
Change-Id: I9b30b0270a610cb42b4e3d885e0240e74a1a4f9a
2018-01-20 14:43:07 +01:00
Translation updater bot e22b485da1 Localisation updates from https://translatewiki.net.
Change-Id: I090d7b5215be5bbd66b457d87dbb1f09e576a905
2018-01-18 22:49:52 +01:00
jenkins-bot 252d117fdd Merge "Improve some parameter docs" 2018-01-16 16:21:51 +00:00
Translation updater bot ec96dc78e9 Localisation updates from https://translatewiki.net.
Change-Id: I0e34c009054ac363b81a633cd80198647298fdb2
2018-01-15 22:25:31 +01:00
Translation updater bot dbca18ad95 Localisation updates from https://translatewiki.net.
Change-Id: Ie54c2c53b153528ffeb613c3a3611c10b039ae73
2018-01-14 22:17:15 +01:00
Translation updater bot 4a3e803268 Localisation updates from https://translatewiki.net.
Change-Id: I209c4b1db263a3243062a12a70ae457c5df87bbb
2018-01-13 22:15:29 +01:00
Kunal Mehta 82584edd0e Don't use deprecated wfMemcKey() or wfGlobalCacheKey()
Change-Id: I7fe5a45226a92ef19c25790a800a7ae7b7a3a57a
2018-01-13 01:07:50 +05:30
Kunal Mehta f5a195a3db Remove no longer needed backwards-compatibility
This extension requires 1.31 (it follows the release branches compatibility
policy), so we can remove a lot of legacy checks and code.

Change-Id: Ieb42073010caffb1f6811d3a2f629aa60c1d2034
2018-01-12 07:07:21 +05:30
Umherirrender cfbd0a1a1b Improve some parameter docs
Change-Id: Ic85f74fc8dcefe86a3620e2d12f0b2ad2386ee23
2018-01-11 21:27:53 +01:00
Kunal Mehta 76dbe5d804 Treat phpdbg as being run from the command-line
The two lualib/ustring generation scripts run independently of MediaWiki, so
the new wfIsCLI() isn't usable there.

Bug: T184043
Change-Id: I217657d12e16a7b76dc814be5fed03540c461e7c
2018-01-10 19:47:19 +05:30
Translation updater bot a4106b391a Localisation updates from https://translatewiki.net.
Change-Id: Ia870740d66821bf3550d6a25492ed41a0be0cc84
2018-01-09 22:29:51 +01:00
Translation updater bot 42715e8481 Localisation updates from https://translatewiki.net.
Change-Id: I7f3d98c1c515204da53565b37278b9a7642f39ad
2018-01-08 22:36:16 +01:00
MarcoAurelio e28870dc62 Amend Abkhazian namespace translation
Bug: T182654
Change-Id: I975cf3010e691d8ee5bc27c8218a71e4c4669501
2018-01-01 11:01:26 +00:00
libraryupgrader a3334f72d8 build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
The following sniffs are failing and were disabled:
* Generic.Files.OneObjectStructurePerFile.MultipleFound
* Squiz.Scope.MethodScope.Missing

The following sniffs now pass and were enabled:
* MediaWiki.Files.OneClassPerFile.MultipleFound

Change-Id: I7499d975eb378abd500619f0026a32b59fe6dda6
2017-12-30 02:28:08 +00:00
Rafid Aslam 07218fd02f Fix the return type of Scribunto_LuaLibraryBase::register()
Before this, tools like Phan and others read
`Scribunto_LuaLibraryBase::register()` returns `\Lua` type
from the document comment,
but it actually returns `array` type since the implementation
of this function should returns the value of
`Scribunto_LuaEngine::registerInterface()` which returns
`array` type.

Change-Id: I25beea963444b715bed7b2890475c0c812949520
2017-12-25 15:08:16 +07:00
Translation updater bot 92d35aaf35 Localisation updates from https://translatewiki.net.
Change-Id: I2b5b70397c830811f24c6e5bbcf23f41d8d2faeb
2017-12-18 23:07:06 +01:00
MarcoAurelio 19dd2170e7 Add Abkhazian namespace translation
Author: <https://www.mediawiki.org/wiki/User:Surprizi>

Bug: T182654
Change-Id: If953006f9d98b1e2bdc727f51c2770ffce67b838
2017-12-13 10:02:40 +00:00
Translation updater bot 96bfe05443 Localisation updates from https://translatewiki.net.
Change-Id: Ie349e9888f0118ca5affc823b46088632d313fff
2017-12-12 22:52:56 +01:00
Translation updater bot 80f3306d33 Localisation updates from https://translatewiki.net.
Change-Id: I0c8b5cd2bc2128fcbe42968d4a2c5aafd9b29a12
2017-12-11 23:39:06 +01:00
libraryupgrader cc01666f67 build: Updating mediawiki/minus-x to 0.2.1
Change-Id: If3752fda98df9b6f80c1c54da967478042d8b449
2017-12-11 07:12:41 +00:00
Translation updater bot 55de7a285d Localisation updates from https://translatewiki.net.
Change-Id: I3accde79eadbd534915d82b7fa08f4828b611ec2
2017-12-05 09:41:39 +01:00
Brad Jorsch c5e75dcdd0 Avoid passing null to count()
PHP 7.2 made the questionable decision to raise a warning for
count( null ). So test for null explicitly before calling count in the
one place where null is expected.

Bug: T181891
Change-Id: I94146c14b63e32ad1e9f2ab9de9ebc403b251102
2017-12-04 10:46:34 -05:00
Translation updater bot ffc2019f6f Localisation updates from https://translatewiki.net.
Change-Id: Icbc6316f4bbe91bb2deab572c9cd70ede6059e62
2017-11-28 22:43:40 +01:00
MarcoAurelio 3f8db0e0d8 Add Mirandese (mwl) namespace translations
Author: <https://www.mediawiki.org/wiki/User:Athena_in_Wonderland>

Bug: T180052
Change-Id: If71fb50d0730310d435975b4cdf7557df36b2d74
2017-11-28 11:49:23 +00:00
Translation updater bot 3de2585770 Localisation updates from https://translatewiki.net.
Change-Id: I249eec9a1883d46576367ed85b974a6c2671df40
2017-11-24 23:21:01 +01:00
MarcoAurelio a4f7cbf81a Add Javanese translations for Scribunto
Provided by <https://www.mediawiki.org/wiki/User:Wirjadisastra> in the
linked Phabricator Task.

Bug: T180578
Change-Id: I1dc82427c6ebb95044b0456c8513cbec19e2ab52
2017-11-17 18:34:35 +00:00
Translation updater bot 903ace899d Localisation updates from https://translatewiki.net.
Change-Id: I88bde7d81609be4ca155d415f0863ba504ceb994
2017-11-15 22:36:23 +01:00