API: Use User::getCanonicalName() when validating user names
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 18 May 2018 09:59:04 +0000 (11:59 +0200)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 18 May 2018 09:59:04 +0000 (11:59 +0200)
commit91c385e138690deeb32605cdf5465d5085b334ac
treeb081ef786ad4f77e4d67c8c540cafed05031ab72
parent996032de89847a02effcee2e3bdb4f77592aee18
API: Use User::getCanonicalName() when validating user names

This is a bit more interoperable than trying to roll our own by using
Title::makeTitleSafe().

We still need to handle IP addresses separately, of course.

Bug: T194916
Change-Id: Ie3900d768cbe15aef079b97d91f7fd23dc7c3e26
includes/api/ApiBase.php
tests/phpunit/includes/api/ApiBaseTest.php