Last modified: 2013-10-03 18:14:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56887, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54887 - Anonymous users shouldn't be allowed to create User:* pages
Anonymous users shouldn't be allowed to create User:* pages
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Page protection (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-02 17:28 UTC by Quim Gil
Modified: 2013-10-03 18:14 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Quim Gil 2013-10-02 17:28:02 UTC
Currently anonymous users can create new pages under the "User" namespace, which doesn't make any sense.

This is an approach used by spammers, also in installations with some filter in account creation: they just go an create "user pages"anonymously, pasting there their rubbish.

What is the right approach to fix this? [[mw:Manual:$wgNamespaceProtection]] prevent just any edits made by some user group to some namespace. But that might be too restrictive since there might be good reasons for an anonymous users to edit or comment an existing user page. Is there a way to prevent page creation only?
Comment 1 Chad H. 2013-10-02 17:32:03 UTC
We only differentiate between create and createtalk for creation permissions. If you need namespace-specific creation/editing permissions then I suggest looking at one of the numerous extensions that can handle this.

WONTFIX for core?
Comment 2 Chris Steipp 2013-10-03 18:14:15 UTC
There are probably extensions that could do that, or it would be a very simple extension to write. Actually, just add something like this in your LocalSettings:

$wgHooks['userCan'][] = function ( &$title, &$user, $action, &$result ) {
	if ( ( $action === 'edit' || $action === 'create' )
		&& $title->getNsText() === "User"
		&& !$user->isLoggedIn()
	) {
		return false;
	}
	return true;
}

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links