lhc/web/wiklou.git
5 years agoMerge "media: Do not pass unused parameter"
jenkins-bot [Sun, 2 Dec 2018 00:18:18 +0000 (00:18 +0000)]
Merge "media: Do not pass unused parameter"

5 years agoMerge "Do not pass unused parameter"
jenkins-bot [Sun, 2 Dec 2018 00:11:45 +0000 (00:11 +0000)]
Merge "Do not pass unused parameter"

5 years agoMerge "export: Do not pass unused parameter"
jenkins-bot [Sun, 2 Dec 2018 00:11:40 +0000 (00:11 +0000)]
Merge "export: Do not pass unused parameter"

5 years agoMerge "rdbms: Pass required parameter"
jenkins-bot [Sun, 2 Dec 2018 00:11:35 +0000 (00:11 +0000)]
Merge "rdbms: Pass required parameter"

5 years agoMerge "Remove unused use in anonymous function"
jenkins-bot [Sun, 2 Dec 2018 00:00:53 +0000 (00:00 +0000)]
Merge "Remove unused use in anonymous function"

5 years agoMerge "Remove unused parameter"
jenkins-bot [Sun, 2 Dec 2018 00:00:48 +0000 (00:00 +0000)]
Merge "Remove unused parameter"

5 years agoMerge "Use correct letter case"
jenkins-bot [Sun, 2 Dec 2018 00:00:43 +0000 (00:00 +0000)]
Merge "Use correct letter case"

5 years agoMerge "Remove unused use in anonymous function"
jenkins-bot [Sun, 2 Dec 2018 00:00:38 +0000 (00:00 +0000)]
Merge "Remove unused use in anonymous function"

5 years agoMerge "Change typehint callback to callable"
jenkins-bot [Sun, 2 Dec 2018 00:00:32 +0000 (00:00 +0000)]
Merge "Change typehint callback to callable"

5 years agoMerge "Change typehint callback to callable"
jenkins-bot [Sun, 2 Dec 2018 00:00:27 +0000 (00:00 +0000)]
Merge "Change typehint callback to callable"

5 years agomedia: Do not pass unused parameter
Jakub Vrana [Sat, 1 Dec 2018 16:48:35 +0000 (17:48 +0100)]
media: Do not pass unused parameter

FileRepo::getHashPath() takes a $name parameter, but File::getHashPath()
doesn't.

Found by PHPStan.

Change-Id: I9cbcfd206249f4be7b50f2b104c797606bc4406a

5 years agoexport: Do not pass unused parameter
Jakub Vrana [Sat, 1 Dec 2018 16:43:51 +0000 (17:43 +0100)]
export: Do not pass unused parameter

Found by PHPStan.

Change-Id: I0e4971a3d5a4170ada776cd88ea664806f23c6ed

5 years agordbms: Pass required parameter
Jakub Vrana [Sat, 1 Dec 2018 16:40:47 +0000 (17:40 +0100)]
rdbms: Pass required parameter

Found by PHPStan.

Change-Id: I8fbb64f7b5058b36381bccd5bc6a9d095b9ace15

5 years agoMerge "Remove unused use in anonymous function"
jenkins-bot [Sat, 1 Dec 2018 23:45:23 +0000 (23:45 +0000)]
Merge "Remove unused use in anonymous function"

5 years agoInfoAction: Add missing @param type
Fomafix [Mon, 26 Nov 2018 05:34:04 +0000 (06:34 +0100)]
InfoAction: Add missing @param type

null is explicit supported and in use.

Change-Id: I495ca2eacb5359c8bf88c094db39fa44ca5866e1

5 years agoWebInstallerUpgrade: Simplify return paths
Fomafix [Sun, 18 Nov 2018 17:33:45 +0000 (18:33 +0100)]
WebInstallerUpgrade: Simplify return paths

* Avoid else after return.
* Combine redundant return values.

Change-Id: If87f5b2163abc7867ce83081aa6ab9e358869060

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 1 Dec 2018 20:53:32 +0000 (21:53 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I849a483d1800b2b580f64d05f3f12453afbf7549

5 years agoFix typo 'defintion'
MarcoAurelio [Sat, 1 Dec 2018 15:18:07 +0000 (16:18 +0100)]
Fix typo 'defintion'

Bug: T201491
Change-Id: I2b6b87761e6e01b982feaccd98f08f66a1888a16

5 years agoMerge "Fix return typehint"
jenkins-bot [Sat, 1 Dec 2018 19:28:11 +0000 (19:28 +0000)]
Merge "Fix return typehint"

5 years agoMerge "Remove unused use in anonymous function"
jenkins-bot [Sat, 1 Dec 2018 19:28:05 +0000 (19:28 +0000)]
Merge "Remove unused use in anonymous function"

5 years agoMerge "Use correct letter case"
jenkins-bot [Sat, 1 Dec 2018 18:49:27 +0000 (18:49 +0000)]
Merge "Use correct letter case"

5 years agoDo not pass unused parameter
Jakub Vrana [Sat, 1 Dec 2018 16:46:07 +0000 (17:46 +0100)]
Do not pass unused parameter

Found by PHPStan.

Change-Id: I760e7382931ac00317319bee5223b0230b24bb7d

5 years agoRemove unused parameter
Jakub Vrana [Sat, 1 Dec 2018 16:33:21 +0000 (17:33 +0100)]
Remove unused parameter

Found by PHPStan.

Change-Id: I0480146fd7fce1d39db904f1c4b6dfa8314a74fe

5 years agoMerge "Changing "===" on secrets to hash_equals to protect from timing attacks."
jenkins-bot [Sat, 1 Dec 2018 15:47:22 +0000 (15:47 +0000)]
Merge "Changing "===" on secrets to hash_equals to protect from timing attacks."

5 years agoChanging "===" on secrets to hash_equals to protect from timing attacks.
Mogmog123 [Sat, 1 Dec 2018 01:25:06 +0000 (01:25 +0000)]
Changing "===" on secrets to hash_equals to protect from timing attacks.

Bug: T207777
Change-Id: I1e12ef94f455f96b4d70af27a315414500c709ab

5 years agoMerge "Message: Throw if given invalid serialized data"
jenkins-bot [Sat, 1 Dec 2018 10:50:18 +0000 (10:50 +0000)]
Merge "Message: Throw if given invalid serialized data"

5 years agoMerge "Message: Don't include Title objects in the serialization (part 1)"
jenkins-bot [Sat, 1 Dec 2018 10:49:38 +0000 (10:49 +0000)]
Merge "Message: Don't include Title objects in the serialization (part 1)"

5 years agoUse correct letter case
Jakub Vrana [Sat, 1 Dec 2018 09:30:20 +0000 (10:30 +0100)]
Use correct letter case

Found by PHPStan.

Change-Id: I31619e0fb1819939b5b64ed01c6959668b86870c

5 years agoUse correct letter case
Jakub Vrana [Sat, 1 Dec 2018 09:28:18 +0000 (10:28 +0100)]
Use correct letter case

Found by PHPStan.

Change-Id: Iaff53951e1e49b9bb99f7bf9da5a228765ead7f3

5 years agoRemove unused use in anonymous function
Jakub Vrana [Sat, 1 Dec 2018 09:17:34 +0000 (10:17 +0100)]
Remove unused use in anonymous function

Found by PHPStan.

Change-Id: I88247514703820a6afb7c9861dcf64326aa32d19

5 years agoRemove unused use in anonymous function
Jakub Vrana [Sat, 1 Dec 2018 09:16:46 +0000 (10:16 +0100)]
Remove unused use in anonymous function

Found by PHPStan.

Change-Id: I50d27a50806048697dcac8e24712a10a6c7e7c16

5 years agoRemove unused use in anonymous function
Jakub Vrana [Sat, 1 Dec 2018 09:13:38 +0000 (10:13 +0100)]
Remove unused use in anonymous function

Found by PHPStan.

Change-Id: Id2dd9996fd4d78da930ee0cc802bb07b66a5f084

5 years agoRemove unused use in anonymous function
Jakub Vrana [Sat, 1 Dec 2018 09:12:32 +0000 (10:12 +0100)]
Remove unused use in anonymous function

Found by PHPStan.

Change-Id: Ic00d2b7b42c7c75b673601eabe947b0f380a3399

5 years agoChange typehint callback to callable
Jakub Vrana [Sat, 1 Dec 2018 09:10:41 +0000 (10:10 +0100)]
Change typehint callback to callable

Found by PHPStan.

Change-Id: I09f21da69ad9b9357cee85a47717dbe1bca04070

5 years agoChange typehint callback to callable
Jakub Vrana [Sat, 1 Dec 2018 09:02:48 +0000 (10:02 +0100)]
Change typehint callback to callable

Found by PHPStan.

Change-Id: I77877a18131bd69996bad07f2ee1c5f3ba3ba2e7

5 years agoFix return typehint
Jakub Vrana [Sat, 1 Dec 2018 08:57:31 +0000 (09:57 +0100)]
Fix return typehint

Found by PHPStan.

Change-Id: Ia5280815f9dda25788de0438af1468adb8c915a6

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 30 Nov 2018 20:54:20 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia2a54ab49aa88e2450c66e91385ecfaac29312ef

5 years agoMerge "Special:Preferences: Add example value as placeholder to timezone offset"
jenkins-bot [Fri, 30 Nov 2018 19:39:05 +0000 (19:39 +0000)]
Merge "Special:Preferences: Add example value as placeholder to timezone offset"

5 years agoMerge "Migrate Api modules from tag_summary table to change_tag"
jenkins-bot [Fri, 30 Nov 2018 19:13:46 +0000 (19:13 +0000)]
Merge "Migrate Api modules from tag_summary table to change_tag"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 29 Nov 2018 21:04:07 +0000 (22:04 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie38cd1c54843a40b6b366ae1945403df102516fe

5 years agoFix RevisionDeleteUser rev_actor query for MySQL
Brad Jorsch [Wed, 28 Nov 2018 18:09:28 +0000 (13:09 -0500)]
Fix RevisionDeleteUser rev_actor query for MySQL

MySQL uses an extremely bad plan for the update with subquery here.
For the time being let's split out the subquery.

This'll break if the user has too many revision rows, but on the other
hand all the existing queries here will probably break in the same way
so let's leave that for later.

Bug: T210628
Change-Id: Ia3eb41b43b96c506349279e19743c41530969636

5 years agoMerge "build: Upgrade stylelint-config-wikimedia to 0.5.0 and make pass"
jenkins-bot [Thu, 29 Nov 2018 03:35:50 +0000 (03:35 +0000)]
Merge "build: Upgrade stylelint-config-wikimedia to 0.5.0 and make pass"

5 years agoMerge "Use ParserCache in CategoryMembershipChangeJob"
jenkins-bot [Thu, 29 Nov 2018 01:15:01 +0000 (01:15 +0000)]
Merge "Use ParserCache in CategoryMembershipChangeJob"

5 years agoMerge "Add stats for block errors on create/edit actions"
jenkins-bot [Thu, 29 Nov 2018 01:04:38 +0000 (01:04 +0000)]
Merge "Add stats for block errors on create/edit actions"

5 years agobuild: Upgrade stylelint-config-wikimedia to 0.5.0 and make pass
Volker E [Wed, 28 Nov 2018 23:31:18 +0000 (15:31 -0800)]
build: Upgrade stylelint-config-wikimedia to 0.5.0 and make pass

Change-Id: I648375927bace5fc21bd842268c645570759ce85

5 years agoMerge "Drop ct_tag column from change_tag table"
jenkins-bot [Wed, 28 Nov 2018 23:52:05 +0000 (23:52 +0000)]
Merge "Drop ct_tag column from change_tag table"

5 years agoMerge "Drop $wgChangeTagsSchemaMigrationStage"
jenkins-bot [Wed, 28 Nov 2018 23:52:00 +0000 (23:52 +0000)]
Merge "Drop $wgChangeTagsSchemaMigrationStage"

5 years agoMerge "Default $wgCommentTableSchemaMigrationStage to MIGRATION_NEW"
jenkins-bot [Wed, 28 Nov 2018 22:32:50 +0000 (22:32 +0000)]
Merge "Default $wgCommentTableSchemaMigrationStage to MIGRATION_NEW"

5 years agoMerge "SQLite: Split actor and comment filearchive updates to a separate file"
jenkins-bot [Wed, 28 Nov 2018 22:32:44 +0000 (22:32 +0000)]
Merge "SQLite: Split actor and comment filearchive updates to a separate file"

5 years agoDrop ct_tag column from change_tag table
Amir Sarabadani [Wed, 14 Nov 2018 20:20:11 +0000 (21:20 +0100)]
Drop ct_tag column from change_tag table

Bug: T194163
Change-Id: I05d43510b51a67733b0107f0a768e261fe8ddabd

5 years agoDrop $wgChangeTagsSchemaMigrationStage
Amir Sarabadani [Wed, 14 Nov 2018 22:04:29 +0000 (23:04 +0100)]
Drop $wgChangeTagsSchemaMigrationStage

Bug: T194163
Change-Id: Ieb6cc60cacf9dd0d86641b1be817249cdce42112

5 years agoMerge "Add block notice stats on EditPage."
jenkins-bot [Wed, 28 Nov 2018 19:55:12 +0000 (19:55 +0000)]
Merge "Add block notice stats on EditPage."

5 years agoMerge "Don't indicate partial blocks on Special:ActiveUsers"
jenkins-bot [Wed, 28 Nov 2018 19:31:08 +0000 (19:31 +0000)]
Merge "Don't indicate partial blocks on Special:ActiveUsers"

5 years agoDefault $wgCommentTableSchemaMigrationStage to MIGRATION_NEW
Brad Jorsch [Wed, 7 Nov 2018 19:50:27 +0000 (14:50 -0500)]
Default $wgCommentTableSchemaMigrationStage to MIGRATION_NEW

WRITE_NEW mode seems to be working well on Wikimedia sites. Let's change
the default to MIGRATION_NEW so existing installs and Wikimedia CI will
start using the new code rather than the old.

This also fixes some unit tests that were broken with MIGRATION_NEW, and
updates some that were forcing MIGRATION_OLD to force MIGRATION_NEW
instead.

Bug: T166733
Change-Id: I7bf4ad0105dd1f6cc49eba3ddcb7a51badcd5ed3
Depends-On: I30f7cdcc3875f3f7af116c1e41e88f62ab9e91d0

5 years agoSQLite: Split actor and comment filearchive updates to a separate file
Brad Jorsch [Wed, 28 Nov 2018 18:53:17 +0000 (13:53 -0500)]
SQLite: Split actor and comment filearchive updates to a separate file

On a fresh install, update.php will apply patch-editsummary-length.sql
even though it doesn't need to. But this partially wipes out the new schema from
tables.sql, and the omnibus comment and actor table patches don't detect
this, leading to filearchive missing the new fields.

Unlike the case with patch-add-3d.sql in I335cb8d9, here the patch does
make a change (if only a tiny one): fa_deleted_reason changes from TEXT
to BLOB.

Change-Id: I08047ff1207d471660365c0eb3faabc0b47746bb

5 years agoMessage: Don't include Title objects in the serialization (part 1)
Brad Jorsch [Wed, 28 Nov 2018 15:23:12 +0000 (10:23 -0500)]
Message: Don't include Title objects in the serialization (part 1)

Stringify the title instead. This will help avoid running into the
PHP/HHVM serialization incompatibility described in T210528.

This is part 1: start stringifying and using the string, but continue
storing the Title object for the benefit of mixed environments where
some servers still only handle a Title object.

Bug: T210528
Change-Id: I07aac3aab2d4e27a7203f4e4fb3ce1b5d86c517c

5 years agoMessage: Throw if given invalid serialized data
Brad Jorsch [Wed, 28 Nov 2018 15:25:01 +0000 (10:25 -0500)]
Message: Throw if given invalid serialized data

Instead of silently winding up with a bogus Message object having most
fields invalidly set to null, just throw an exception.

Bug: T210528
Change-Id: I79313f8acf3ebb1ef12dac30c362aa10c715f40b

5 years agoDon't indicate partial blocks on Special:ActiveUsers
Thalia [Mon, 26 Nov 2018 14:00:35 +0000 (14:00 +0000)]
Don't indicate partial blocks on Special:ActiveUsers

Only indicate sitewide blocks here.

Bug: T210391
Change-Id: I01d2fa6e326722d85652d96842e968c80d034274

5 years agoFix typo in mw.Title test
Ed Sanders [Wed, 28 Nov 2018 11:29:58 +0000 (11:29 +0000)]
Fix typo in mw.Title test

Change-Id: I344515458a5760f93be2294c431b27c8afae46c5

5 years agoAdd stats for block errors on create/edit actions
Dayllan Maza [Fri, 16 Nov 2018 03:33:47 +0000 (22:33 -0500)]
Add stats for block errors on create/edit actions

Monitoring block errors is behind $wgEnableBlockNoticeStats
and it is disabled by default.

The reason behind this metric is to get an idea on how
frequently blocked users attempt to edit a page. Similar tracking
is being added to MobileFrontend and VisualEditor.

Depends-On: I6bd1c95548616677e1f72ba6bcfc6f2b551c1ca6
Bug: T201717
Change-Id: I18bdb5ce61509ba3c2cea9aa6247656b9bd388e0

5 years agoAdd block notice stats on EditPage.
Dayllan Maza [Thu, 8 Nov 2018 04:03:53 +0000 (23:03 -0500)]
Add block notice stats on EditPage.

Monitoring block notices is behind $wgEnableBlockNoticeStats config
flag which is set to false by default.

The reason behind this metric is to get an idea on how
frequently blocked users attempt to edit a page. Similar tracking
is being added to MobileFrontend and VisualEditor.

Bug: T201718
Change-Id: I6bd1c95548616677e1f72ba6bcfc6f2b551c1ca6

5 years agoMerge "SQLite: Make patch-add-3d.sql a no-op"
jenkins-bot [Wed, 28 Nov 2018 01:42:12 +0000 (01:42 +0000)]
Merge "SQLite: Make patch-add-3d.sql a no-op"

5 years agoUse ParserCache in CategoryMembershipChangeJob
daniel [Wed, 14 Nov 2018 17:07:20 +0000 (18:07 +0100)]
Use ParserCache in CategoryMembershipChangeJob

Note that we will still be re-parsing either the old or the new
revision. Keeping the rendered version of the old revision cached
for a bit would be nice, but ParserCache currently does not
support this.

Bug: T205369
Change-Id: I86d26e494924eec24e7b1fb32c424ac1284be478

5 years agoSpecial:Preferences: Add example value as placeholder to timezone offset
Volker E [Tue, 27 Nov 2018 23:03:02 +0000 (15:03 -0800)]
Special:Preferences: Add example value as placeholder to timezone offset

Adding example value as placeholder message in timezone offset input.

Bug: T194524
Change-Id: I1fd6183233109355e49b7baecf44a8603c1efdb2

5 years agoeslint: Drop 'dot-notation' rule
Ed Sanders [Tue, 27 Nov 2018 22:36:25 +0000 (22:36 +0000)]
eslint: Drop 'dot-notation' rule

Bug: T210552
Change-Id: I07620ed2e3a1acfd3193e411c8369722ae751ffa

5 years agoMerge "SpecialPreferences: Make save button bar sticky"
jenkins-bot [Tue, 27 Nov 2018 21:39:50 +0000 (21:39 +0000)]
Merge "SpecialPreferences: Make save button bar sticky"

5 years agoMerge "ApiSandbox: Fix sticky value for Webkit"
jenkins-bot [Tue, 27 Nov 2018 21:20:40 +0000 (21:20 +0000)]
Merge "ApiSandbox: Fix sticky value for Webkit"

5 years agoMerge "Fix global variable name typo in LocalIdLookupTest.php"
jenkins-bot [Tue, 27 Nov 2018 21:14:52 +0000 (21:14 +0000)]
Merge "Fix global variable name typo in LocalIdLookupTest.php"

5 years agoMerge "Don't indicate partial blocks on Special:ListUsers"
jenkins-bot [Tue, 27 Nov 2018 20:59:37 +0000 (20:59 +0000)]
Merge "Don't indicate partial blocks on Special:ListUsers"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 27 Nov 2018 20:57:42 +0000 (21:57 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I1a1e1cf1ee78dc6cb1bafe95a6fae84a4aef558b

5 years agoApiSandbox: Fix sticky value for Webkit
Volker E [Tue, 27 Nov 2018 20:26:27 +0000 (12:26 -0800)]
ApiSandbox: Fix sticky value for Webkit

Change-Id: I86dbfc259630f3e1f3de7d4f4f7bb4fc70588fb5

5 years agoSpecialPreferences: Make save button bar sticky
Ed Sanders [Tue, 6 Nov 2018 13:31:47 +0000 (13:31 +0000)]
SpecialPreferences: Make save button bar sticky

Enable `position: sticky` on preferences buttons and degrade
gracefully in unsupported browsers, where this results in no
change.

Bug: T205866
Change-Id: Ic98a9d94d3136a4003370cf0e2a8efb7ae1a3f38

5 years agoFix global variable name typo in LocalIdLookupTest.php
Alangi Derick [Tue, 27 Nov 2018 15:47:07 +0000 (16:47 +0100)]
Fix global variable name typo in LocalIdLookupTest.php

Per @Thiemo and @Anomie's comments on the patch, droppping dependency
of the test value to not be a global, using "dummy" in this case.

Bug: T210512
Change-Id: I26aff5fe4782837a8f52a102ae1bdbac49b748bc

5 years agoMerge "API: Add exception class as data to internal_api_error codes"
jenkins-bot [Tue, 27 Nov 2018 19:14:12 +0000 (19:14 +0000)]
Merge "API: Add exception class as data to internal_api_error codes"

5 years agoMerge "API: Validate API error codes"
jenkins-bot [Tue, 27 Nov 2018 19:08:25 +0000 (19:08 +0000)]
Merge "API: Validate API error codes"

5 years agoMerge "Accept BCP 47 codes in LanguageConverter rules"
jenkins-bot [Tue, 27 Nov 2018 18:49:25 +0000 (18:49 +0000)]
Merge "Accept BCP 47 codes in LanguageConverter rules"

5 years agoMerge "Implement Title.wantSignaturesNamespace in JS"
jenkins-bot [Tue, 27 Nov 2018 18:04:46 +0000 (18:04 +0000)]
Merge "Implement Title.wantSignaturesNamespace in JS"

5 years agoImplement Title.wantSignaturesNamespace in JS
Ed Sanders [Tue, 27 Nov 2018 17:25:52 +0000 (17:25 +0000)]
Implement Title.wantSignaturesNamespace in JS

Change-Id: Ib2faa22c429096d545ddb829a6b4025427ad6071

5 years agoMigrate Api modules from tag_summary table to change_tag
Amir Sarabadani [Tue, 27 Nov 2018 17:12:06 +0000 (18:12 +0100)]
Migrate Api modules from tag_summary table to change_tag

Bug: T209525
Change-Id: I7624d86bbff675eab7fee97adf3b7e2e6753f81d

5 years agoSync up with Parsoid parserTests.txt
Subramanya Sastry [Tue, 27 Nov 2018 17:05:36 +0000 (12:05 -0500)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit 463678ed5c83764a3558fec13cea07825a4fddd4

Change-Id: I5bd67b9f20ee9cda2c1141670ab140d65f8a2cc0

5 years agoMerge "Do not ignore the 'Prevent this user from editing his own talk page while...
jenkins-bot [Tue, 27 Nov 2018 16:28:01 +0000 (16:28 +0000)]
Merge "Do not ignore the 'Prevent this user from editing his own talk page while blocked' option on partial blocks."

5 years agoMerge "Quoted attributes don't need to be followed by a space"
jenkins-bot [Tue, 27 Nov 2018 16:21:41 +0000 (16:21 +0000)]
Merge "Quoted attributes don't need to be followed by a space"

5 years agoMerge "Parse wikitext in gallery caption"
jenkins-bot [Tue, 27 Nov 2018 15:47:50 +0000 (15:47 +0000)]
Merge "Parse wikitext in gallery caption"

5 years agoMerge "Protect legacy URL parameter syntax in link and alt options"
jenkins-bot [Tue, 27 Nov 2018 15:32:44 +0000 (15:32 +0000)]
Merge "Protect legacy URL parameter syntax in link and alt options"

5 years agoDo not ignore the 'Prevent this user from editing his own talk page while
David Barratt [Tue, 27 Nov 2018 06:43:21 +0000 (01:43 -0500)]
Do not ignore the 'Prevent this user from editing his own talk page while
blocked' option on partial blocks.

Partial blocks currently ignore this option as it gets into an edge case. The
option should take precidence if it is true, but should be ignored if it is
false. On sitewide blocks, the option should always be honored.

Bug: T210475
Change-Id: I33177b48a5c261ec3f510ce01998c1b096077b85

5 years agoProtect legacy URL parameter syntax in link and alt options
C. Scott Ananian [Mon, 26 Nov 2018 17:53:51 +0000 (12:53 -0500)]
Protect legacy URL parameter syntax in link and alt options

HTML doesn't allow certain semicolon-less HTML entities in attribute
values to avoid breaking legacy markup like:
  <a href="http://example.com?foo&param=bar">...</a>
(Note that the & in that URL is not properly entity-escaped as `&amp;`.)

Unlike wikitext, HTML generally allows semicolon-less legacy entities
in text.

Our alt and link option processing shove text through
Sanitizer::stripAllTags, which does entity decoding including these
legacy semicolon-less entities.  Wikitext doesn't allow semicolon-less
entities, so escape & characters where appropriate to protect alt/link
options and avoid breaking URLs.

This was a "regression" in how alt options were handled starting in
ddb4913f53624c8ee0a2a91bd44bf750e378569d when we switched to using
Remex for Sanitizer::stripAllTags -- semicolon-less entities (previously
invalid in wikitext) were now being decoded when stripAllTags was
called on alt text.  This change became a problem when
ad80f0bca27c2b0905b2b137977586bfab80db34 sent link option text through
Sanitizer::stripAllTags (with the new semicolon-less entity decode)
instead of PHP's strip_tags (which, in addition to its other faults,
doesn't do entity decode at all).  This suddenly started decoding
"non-wikitext" entities like `&para` inside URLs, breaking links.
Filed T210437 as a follow-up to consider changing the behavior
of Sanitizer::stripAllTags() globally to prevent it from decoding
semicolon-less entities for all callers.

Bug: T209236
Change-Id: I5925e110e335d83eafa9de935c4e06806322f4a9

5 years agoMerge "Preferences: Remove unused message for RC/Watchlist opt-out section"
jenkins-bot [Tue, 27 Nov 2018 14:36:30 +0000 (14:36 +0000)]
Merge "Preferences: Remove unused message for RC/Watchlist opt-out section"

5 years agoMerge "Migrate ApiQueryLogEvents from tag_summary to change_tag"
jenkins-bot [Tue, 27 Nov 2018 00:33:17 +0000 (00:33 +0000)]
Merge "Migrate ApiQueryLogEvents from tag_summary to change_tag"

5 years agoMerge "Split ChangeTags::modifyDisplayQuery() to two smaller functions"
jenkins-bot [Tue, 27 Nov 2018 00:33:11 +0000 (00:33 +0000)]
Merge "Split ChangeTags::modifyDisplayQuery() to two smaller functions"

5 years agoMerge "rdbms: rename setDomainPrefix to setLocalDomainPrefix in ILoadBalancer"
jenkins-bot [Tue, 27 Nov 2018 00:27:32 +0000 (00:27 +0000)]
Merge "rdbms: rename setDomainPrefix to setLocalDomainPrefix in ILoadBalancer"

5 years agoMerge "Add logging for redundant parsing to WikitextContent."
jenkins-bot [Mon, 26 Nov 2018 23:00:54 +0000 (23:00 +0000)]
Merge "Add logging for redundant parsing to WikitextContent."

5 years agoMerge "Use stashed ParserOutput during saving."
jenkins-bot [Mon, 26 Nov 2018 22:53:34 +0000 (22:53 +0000)]
Merge "Use stashed ParserOutput during saving."

5 years agoAdd logging for redundant parsing to WikitextContent.
daniel [Thu, 15 Nov 2018 15:41:29 +0000 (16:41 +0100)]
Add logging for redundant parsing to WikitextContent.

Bug: T205369
Change-Id: I67bfdc0340e0ddc1ecdaf3323f2171b2e752c680

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 26 Nov 2018 21:05:32 +0000 (22:05 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibc3a851342d0559915206fc3b9ef2ba47fb1a065

5 years agoMerge "mediawiki.ui: Remove unused `.mw-ui-checked` class"
jenkins-bot [Mon, 26 Nov 2018 20:30:31 +0000 (20:30 +0000)]
Merge "mediawiki.ui: Remove unused `.mw-ui-checked` class"

5 years agoMerge "Install wikimedia/password-blacklist 0.1.3 (fix-up)"
jenkins-bot [Mon, 26 Nov 2018 19:09:30 +0000 (19:09 +0000)]
Merge "Install wikimedia/password-blacklist 0.1.3 (fix-up)"

5 years agoSQLite: Make patch-add-3d.sql a no-op
Brad Jorsch [Wed, 21 Nov 2018 16:13:52 +0000 (11:13 -0500)]
SQLite: Make patch-add-3d.sql a no-op

On a fresh install, update.php will apply patch-add-3d.sql even though
it doesn't need to. But this partially wipes out the new schema from
tables.sql, and the omnibus comment and actor table patched don't detect
this, leading to image, oldimage, and filearchive missing the new
fields.

Since SQLite doesn't actually care about the values in the ENUM type
(it's just an alias for TEXT), let's just make patch-add-3d.sql do
nothing.

Change-Id: I335cb8d9626f535a66b0fe18e051640b22848ef7

5 years agoPreferences: Remove unused message for RC/Watchlist opt-out section
Roan Kattouw [Mon, 26 Nov 2018 18:43:59 +0000 (10:43 -0800)]
Preferences: Remove unused message for RC/Watchlist opt-out section

Also remove the mapping from "optoutwatchlist" and "optoutrc" to
"opt-out".

Bug: T207741
Change-Id: I7aecf11496d2f13d11944b5ce1910362c4268ad4
Follows-Up: I8d6795f5e39fa5bceabd2da5e6a5b43d009a3bab

5 years agoAPI: Add exception class as data to internal_api_error codes
Brad Jorsch [Mon, 26 Nov 2018 18:31:41 +0000 (13:31 -0500)]
API: Add exception class as data to internal_api_error codes

The code for all uncaught exceptions will in the future be
"internal_api_error". If the client needs to know the class name for
some reason, it can check the new 'errorclass' data item on the error.

Change-Id: Ia9e32bbb8d17692203f4fbcee53a20e87be1776e

5 years agoAPI: Validate API error codes
Brad Jorsch [Wed, 7 Nov 2018 16:25:40 +0000 (11:25 -0500)]
API: Validate API error codes

Validate them in ApiMessageTrait when the message is created, and again
in ApiMain before they're included in the header.

This also introduces an "api-warning" log channel, since "api" is too
spammy for real use, and converts a few existing things to use it.

Bug: T208926
Change-Id: Ib2d8bd4d4a5d58af76431835ba783c148de7792a
Depends-On: Iced44f2602d57eea9a2d15aee5b8c9a50092b49c
Depends-On: I5c2747f527c30ded7a614feb26f5777d901bd512
Depends-On: I9c9bd8f5309518fcbab7179fb71d209c005e5e64