Extra trailing spaces after IP in Special:DeletedContributions trigger MediaWiki internal error
Closed, ResolvedPublic

Description

Eg.
https://commons.wikimedia.org/wiki/Special:DeletedContributions?target=183.82.97.1+&namespace=

No such problem if the trailing spaces are added to username (non-IP).

The request is obviously incorrect, but it should not trigger such an error. Some data validation seem to be missing.

Ankry created this task.Feb 17 2018, 1:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 17 2018, 1:22 PM
[WogsmgpAICEAAHbyIdAAAACA] /wiki/Special:DeletedContributions?target=183.82.97.1+&namespace=   Wikimedia\Assert\ParameterAssertionException from line 63 of /srv/mediawiki/php-1.31.0-wmf.21/vendor/wikimedia/assert/src/Assert.php: Bad value for parameter $dbkey: invalid DB key 'Block/183.82.97.1_'
#0 /srv/mediawiki/php-1.31.0-wmf.21/includes/title/TitleValue.php(86): Wikimedia\Assert\Assert::parameter(boolean, string, string)
#1 /srv/mediawiki/php-1.31.0-wmf.21/includes/specialpage/SpecialPage.php(100): TitleValue->__construct(integer, string, string)
#2 /srv/mediawiki/php-1.31.0-wmf.21/includes/specialpage/SpecialPage.php(85): SpecialPage::getTitleValueFor(string, string, string)
#3 /srv/mediawiki/php-1.31.0-wmf.21/includes/specials/SpecialContributions.php(383): SpecialPage::getTitleFor(string, string)
#4 /srv/mediawiki/php-1.31.0-wmf.21/includes/specials/SpecialDeletedContributions.php(145): SpecialContributions::getUserLinks(DeletedContributionsPage, User)
#5 /srv/mediawiki/php-1.31.0-wmf.21/includes/specials/SpecialDeletedContributions.php(90): DeletedContributionsPage->getSubTitle(User)
#6 /srv/mediawiki/php-1.31.0-wmf.21/includes/specialpage/SpecialPage.php(522): DeletedContributionsPage->execute(NULL)
#7 /srv/mediawiki/php-1.31.0-wmf.21/includes/specialpage/SpecialPageFactory.php(579): SpecialPage->run(NULL)
#8 /srv/mediawiki/php-1.31.0-wmf.21/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#9 /srv/mediawiki/php-1.31.0-wmf.21/includes/MediaWiki.php(861): MediaWiki->performRequest()
#10 /srv/mediawiki/php-1.31.0-wmf.21/includes/MediaWiki.php(524): MediaWiki->main()
#11 /srv/mediawiki/php-1.31.0-wmf.21/index.php(42): MediaWiki->run()
#12 /srv/mediawiki/w/index.php(3): include(string)
#13 {main}

Change 464826 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/core@master] Remove trailing spaces from IP addr in Special:DeletedContributions

https://gerrit.wikimedia.org/r/464826

D3r1ck01 added a project: User-D3r1ck01.
D3r1ck01 moved this task from Radar to Doing (Work In Progress) on the User-D3r1ck01 board.

Change 464826 merged by jenkins-bot:
[mediawiki/core@master] Remove trailing spaces from IP addr in Special:DeletedContributions

https://gerrit.wikimedia.org/r/464826

Change 465774 had a related patch set uploaded (by Krinkle; owner: Alangi Derick):
[mediawiki/core@wmf/1.32.0-wmf.24] Remove trailing spaces from IP addr in Special:DeletedContributions

https://gerrit.wikimedia.org/r/465774

Change 465774 merged by jenkins-bot:
[mediawiki/core@wmf/1.32.0-wmf.24] Remove trailing spaces from IP addr in Special:DeletedContributions

https://gerrit.wikimedia.org/r/465774

Mentioned in SAL (#wikimedia-operations) [2018-10-10T22:43:36Z] <krinkle@deploy1001> Synchronized php-1.32.0-wmf.24/includes/specials/SpecialDeletedContributions.php: T187619 - Ic6b0d8020553 (duration: 00m 48s)