This did some overactive canonicalization of the input username before username and database were split, breaking access to remote users where the database name contained an underscore -- it was changed to space.
This would also have broken numeric access, I think, but I didn't bother to test that. :)
Fix moves the username canonicalization down into fetchUser() after we split the name and database, so we now can access remote folks via non-canonical forms and we don't break the dbnames.
} else {
$this->mTarget = $wgRequest->getVal( 'user' );
}
- $this->mTarget = User::getCanonicalName( $this->mTarget );
/*
* If the user is blocked and they only have "partial" access
if( !$name ) {
return new WikiErrorMsg( 'noname' );
}
+ } else {
+ $name = User::getCanonicalName( $name );
+ if( !$name ) {
+ // invalid name
+ return new WikiErrorMsg( 'nosuchusershort', $username );
+ }
}
if( $database == '' ) {