Commit graph

53557 commits

Author SHA1 Message Date
Thiemo Kreuz
3535e4e84e Update type hints and documentation of RevisionDeleteUser
Technically unrelated, but motivated by Ib59cf77.

Change-Id: I54cb9c396552d6982f5ca8463e00a0769e60a291
2019-01-31 21:19:38 +00:00
Translation updater bot
326e393461 Localisation updates from https://translatewiki.net.
Change-Id: Ie2c639a0adbb91dc68109e58b6d74263e8ae0f0c
2019-01-31 21:53:43 +01:00
jenkins-bot
9498a7068a Merge "Correct whitespace and parentheses typos in BlockLogFormatter" 2019-01-31 14:50:49 +00:00
jenkins-bot
5dcaded726 Merge "Fix documentation for RevisionRecord::$mPageId" 2019-01-31 11:59:42 +00:00
Thalia
5be7438ed6 Correct whitespace and parentheses typos in BlockLogFormatter
Change-Id: I9e79e9d274e8ed1fa94966f5e1ac01f8fcd6d96b
2019-01-30 22:46:28 -08:00
jenkins-bot
0e9d4e9c78 Merge "Avoid making master connection from Skin::getUndeleteLink" 2019-01-31 01:38:43 +00:00
jenkins-bot
2a571b49bb Merge "Remove deprecated wgEnableParserCache" 2019-01-31 00:00:50 +00:00
jenkins-bot
ab50a9fbf6 Merge "RemexCompatMunger: Don't split p-wrapping on style/link tags" 2019-01-30 23:39:34 +00:00
jenkins-bot
b7499cecc6 Merge "Password: replace equals() with verify()" 2019-01-30 23:04:08 +00:00
Thalia
7fc8b36288 Avoid making master connection from Skin::getUndeleteLink
Do this by calling Title:quickUserCan instead of Title::userCan
from Skin::getUndeleteLink.

Bug: T214735
Change-Id: I24dfd86275638e52012a5647ab3e5c848af840c2
2019-01-30 14:51:27 -08:00
jenkins-bot
aa22756f8d Merge "Localisation updates from https://translatewiki.net." 2019-01-30 20:54:55 +00:00
Translation updater bot
e6a3c2b255 Localisation updates from https://translatewiki.net.
Change-Id: If0c6e253be60e3b6b0b36f1281936b4719cb1eeb
2019-01-30 21:53:36 +01:00
Thiemo Kreuz
4b71077646 Remove a few obscure "done" and "empty" comments
These don't add any knowledge to what is already obvious from the
code, I find.

Change-Id: Ia613b6a059f78dbeefdfd020899bd1a6e239a731
2019-01-30 20:35:14 +00:00
Brad Jorsch
4597559d84 RemexCompatMunger: Don't split p-wrapping on style/link tags
<style> and <link> tags are metadata tags, they shouldn't split the <p>
tag when p-wrapping content.

Bug: T208901
Change-Id: I2ef5da68c9ccde4477d8295dfe4abf8497c5d26e
2019-01-30 09:10:24 -08:00
Kunal Mehta
951690c02e Rename tests/phpunit/includes/media files to match class names
The classes were renamed in 9bf39163, this updates the test cases to
match. Also take care of XCF while we're at it too.

Change-Id: Iaaeee93e496af6cdd610df5bc75302ecfe273f64
2019-01-29 23:21:13 -08:00
Brian Wolff
19619edf43 installer: Suggest using 127.0.0.1 in the db not found error message
Its a really common error people have where they specify
localhost, not realizing that mysql does socket magic for that
value, and they need to specify 127.0.0.1 instead.

Also remove windows specific language in the help text.
Although more of an issue on windows, it is not unheard of
to happen on linux if the mysql socket is not configured.

Change-Id: Ie8199ab50d37dc2bc43dfafe2e5ef7812e9d832c
2019-01-28 23:35:28 +00:00
Translation updater bot
95d19d7522 Localisation updates from https://translatewiki.net.
Change-Id: I55f7b5a4c28e9756e5432573a67a179aed70fa4c
2019-01-28 22:03:28 +01:00
David Barratt
e865b57cbe Add Namespace Restrictions to Special:BlockList
The editing restrictions will be split by type and add a heading for each type.
The namespace will be linked to Special:AllPages with the namespace set so the
user can see what pages the user is blocked from.

Bug: T204990
Change-Id: Idb1de20c1a780562b072ea350e5ba7dd1518d177
2019-01-28 18:37:58 +00:00
Translation updater bot
9a95b226d0 Localisation updates from https://translatewiki.net.
Change-Id: Ia1d66a4d2b2aa5fb06b85b15c89cdc941dea363d
2019-01-26 21:54:18 +01:00
Timo Tijhof
d39cc0e885 Remove deprecated wgEnableParserCache
One less thing to do in Setup.php.

Bug: T189966
Change-Id: Ie9b631897fda51f6db9fc4d634bcbd6bf865dfc9
2019-01-25 21:08:10 -08:00
jenkins-bot
ebd1cbe089 Merge "Add namespace restrictions to block's log messages" 2019-01-25 21:33:16 +00:00
Translation updater bot
9651459311 Localisation updates from https://translatewiki.net.
Change-Id: I371f47ad51f9cce54686e9e7dad8e186274c8962
2019-01-25 22:08:04 +01:00
Dayllan Maza
85c91cfbf0 Add namespace restrictions to block's log messages
Currently, there are 3 block messages: sitewide, partial with restrictions, and
non-editing partial blocks. This will add namespace restrictions to the
partial editing blocks message type.

Bug: T204985
Change-Id: Ic17d5459e67c267fdee1fb2513d67428148ac85d
2019-01-25 15:46:11 -05:00
jenkins-bot
247724d82c Merge "Don't check anon permissions for maint scripts in autoCreateUser()" 2019-01-25 02:22:32 +00:00
James Montalvo
ddf37fec6d
Don't check anon permissions for maint scripts in autoCreateUser()
AuthManager::autoCreateUser() causes createAndPromote.php to give error
"Automatic account creation is not allowed." when
$wgGroupPermissions['*']['createaccount']=false is set. Anonymous user
checks should be skipped for maintenance scripts.

Change-Id: Ib61889a758e542abe991707d8b7853a25cfed8e9
2019-01-24 17:45:10 -08:00
Bill Pirkle
e8cb9f5f83 http: Support callback functions in GuzzleHttpRequest
Provide backward compatibility for callback functions in
GuzzleHttpRequest, which was missing in T202110, and restore
GuzzleHttpRequest as the default provided by HttpRequestFactory.

Bug: T212175
Depends-On: I4b45e79d35252d13f714f3271b87301ca515121a
Change-Id: I60d1a034b44874f6d24a04058db264eeb565f5e1
2019-01-24 22:05:10 +00:00
Max Semenik
7a7976ba7a Password: replace equals() with verify()
So far, our key derivation code assumed that it has control over
the salt used by the derivation routines, however I want to add Argon2
support and it doesn't work this way: password_hash() generates the
salt itself, and the only way to verify a password is by using
password_verify(). Current way the things are done doesn't support it
because it relies on the result of password hashing with parameters we
provide to be deterministic.

Therefore, I'm deprecating Password::equals(), as well as whole concept
of comparing Password objects - it's used only in tests anyway. It's
getting replaced with verify() that only accepts password strings.
Uses of old function are fixed with exception of a few calls in tests
that will be addressed in my Argon2 patch.

Change-Id: I2b2be9a422ee0f773490eac316ad81505c3f8571
2019-01-24 13:40:40 -08:00
Translation updater bot
cd0860616a Localisation updates from https://translatewiki.net.
Change-Id: Ia3e8a3a29198b7032e95618445aa53ab72f65cf0
2019-01-24 22:16:57 +01:00
jenkins-bot
8879f68e9b Merge "Add missing @return PHPDoc to __sleep() function" 2019-01-24 20:40:31 +00:00
jenkins-bot
7b51b9c299 Merge "Clone the Title object to prevent mutations." 2019-01-24 20:24:01 +00:00
Derick Alangi
f25ff9ff9a Add missing @return PHPDoc to __sleep() function
Change-Id: I97547938041264440af621694f08a067f1d0791f
2019-01-24 21:17:47 +01:00
jenkins-bot
c4e35c216d Merge "MIME: Re-classify DjVu files as OFFICE, like PDFs, and not as BITMAP" 2019-01-24 11:11:19 +00:00
David Barratt
dedfe98eaa
Clone the Title object to prevent mutations.
The Title object that is loaded from master gets reloaded from the replicas
and mutates the original object. When pages are moved, the Title no longer
exists on master, but still exists on the replicas. Cloning the object allows
the item to be loaded from the replicas, without mutating the original Title.

Bug: T210739
Change-Id: I9ad973e9a609124749909605f37bc1e1fc549585
2019-01-23 17:53:56 -05:00
jenkins-bot
a23e9cee4e Merge "Fix typo in apierror message" 2019-01-23 21:41:08 +00:00
Translation updater bot
19ffce7203 Localisation updates from https://translatewiki.net.
Change-Id: I19182d49545679c7e86a71009616f23ba335efa5
2019-01-23 22:05:12 +01:00
jenkins-bot
904049846c Merge "Fix Title::getFragmentForURL for bad interwiki prefix." 2019-01-23 20:02:52 +00:00
jenkins-bot
24b5967313 Merge "Add namespace restrictions to Special:Block and API" 2019-01-23 17:04:55 +00:00
jenkins-bot
c1436805cd Merge "Introduce multiselect widgets for namespaces" 2019-01-23 17:02:41 +00:00
jenkins-bot
dfa8b14e21 Merge "Add NamespaceRestriction class so that BlockRestriction can handle namespaces." 2019-01-23 12:39:55 +00:00
daniel
337311662d Fix Title::getFragmentForURL for bad interwiki prefix.
Calling Title::getLinkURL or any other method that relies on
getFragmentForURL on a title with an unknown interwiki prefix
was triggering a fatal error. With this patch, that situation is
handled more gracefully.

Bug: T204800
Change-Id: I665cd5e983a80c15c68c89541d9c856082c460bb
2019-01-23 11:17:21 +01:00
jenkins-bot
f7ead5d3ca Merge "Better detection for old MS Office files" 2019-01-23 01:01:43 +00:00
Tim Starling
f12db38048 Better detection for old MS Office files
* Introduce MSCompoundFileReader, which reads the CFB directory and
  detects the file type from well-known names in the root directory
* Do not detect a ZIP file if the EOCDR is not at the end. Other
  containers, especially CFB files, may contain ZIP files embedded
  within them in the last 64KB, but this is not a security concern
  unless the EOCDR is exactly at the end of the file.

Bug: T40432
Change-Id: Id5b1a258ccf3c3c8951e32f6b7a5b1bafe941082
2019-01-23 09:23:17 +11:00
Ammarpad
dfb87515cd Fix typo in apierror message
Replace "conjuction" with "conjunction" in Apierror-redirect-appendonly/en message

Bug: T201491
Change-Id: Ia121deecf256888736a9a4de18967f85f063d153
2019-01-22 20:56:36 +00:00
Translation updater bot
f2ef7b7fc7 Localisation updates from https://translatewiki.net.
Change-Id: Ia9ecbc8465dd445aa109916f2e8dda5161ed2ebd
2019-01-22 21:53:23 +01:00
jenkins-bot
d20cbd9ad5 Merge "rdbms: Remove references to pg_attrdef.adsrc in Postgres code" 2019-01-22 19:52:58 +00:00
jenkins-bot
bf5050d564 Merge "Convert RandomImageGenerator to use the new execution framework" 2019-01-22 19:33:49 +00:00
Jeff Janes
27d342ef4b rdbms: Remove references to pg_attrdef.adsrc in Postgres code
PostgreSQL v12 will remove the long-deprecated column
pg_attrdef.adsrc.  The supported way to introspect into column
default values is pg_get_expr(adbin, adrelid), which works
back through all versions of PostgreSQL supported by wikimedia.

Changing to the supported method will allow the upcoming v12 of the
database to be used while maintaining compatibility with older
versions, without needing to write version-specific code.

This patch has been tested with maintenance/update.php and
with phpunit in PostgreSQL versions 9.2, 11, and 12dev.  It does
not harm the first two, and fixes errors that would otherwise
arise in the dev version.  All unit tests which pass under version
11 now pass under 12dev as well.

Change-Id: I874d347fd286b26773113d4f0c6c30d9a4055ad3
2019-01-22 19:23:06 +00:00
Thalia
f589214d0f Add namespace restrictions to Special:Block and API
This adds a UI for blocking namespaces to Special:Block
and a namespacerestrictions parameter to the block API.

The number of namespace restrictions in a single block
is not limited as page restrictions are.

The checkbox allowing the blocker to specify whether
the target can edit their own user page is normally
disabled for a partial block, but is re-enabled if
the block is to the user talk namespace.

If the config $wgBlockAllowsUTEdit is set to false, the
checkbox will not appear, and the target will not be
able to edit their own user talk page if they are
sitewide-blocked, namespace-blocked from the user talk
namespace, or page-blocked from their user talk page.

Bug: T204986
Change-Id: I9e231ad109d7285486ec332b26780339592b8df7
2019-01-22 12:48:55 +00:00
Thalia
ccbe9f3590 Introduce multiselect widgets for namespaces
Bug: T204986
Change-Id: Ie3916e2322d8b1a7effe9ba4604b596b568004e6
2019-01-22 12:48:42 +00:00
Max Semenik
30e1e9ba2c Hard-deprecate wfArrayFilter() and wfArrayFilterByKey()
Deprecated in 1.32, no callers.

Change-Id: Id6147cff1336cc39863c985023933ce9c6afca31
2019-01-21 23:04:01 -08:00