Page MenuHomePhabricator

User-defined project domains should be validated
Open, MediumPublic3 Estimated Story PointsBUG REPORT


Steps to Reproduce:

  • Go to Special:GlobalWatchlistSettings
  • Add the wiki "foobar" and Save settings
  • Go to Special:GlobalWatchlist

Actual Results:

  • You get the popup "GlobalWatchlist error, please check the console!"

Expected Results:

  • Shown errors when attempting to save the invalid wiki. Or, "foobar" could silently be ignored and not ever saved.

Event Timeline

Restricted Application added a project: User-DannyS712. · View Herald TranscriptThu, Nov 19, 6:40 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
DannyS712 triaged this task as Medium priority.Thu, Nov 19, 6:49 AM
DannyS712 moved this task from Unsorted to Next on the User-DannyS712 board.
DannyS712 set the point value for this task to 3.Thu, Nov 19, 6:52 AM
DannyS712 added a subscriber: DannyS712.

Should be able to do in the next few days
Going to go with the show errors route, though validation will only be available if CentralAuth is installed.
To get the url forms of the wikis a user is attached on:

$urls = array_map(
	function ( $dbName ) {
		$wiki = WikiMap::getWiki( $dbName );
		return $wiki ? $wiki->getDisplayName() : '';
	CentralAuthUser::getInstanceByName( 'DannyS712' )->listAttached()

(where DannyS712 is replaced with a variable for the acting user's name; can also use CentralAuthUser::getInstance with a user object)

Change 642091 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/GlobalWatchlist@master] Validate user-provided site list with CentralAuth