Last modified: 2011-03-13 18:06:25 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 T16569, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14569 - Create the 'MediaWiki default' user on wiki creation, or on upgrade if user does not exist.
Create the 'MediaWiki default' user on wiki creation, or on upgrade if user d...
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.13.x
All All
: Lowest minor (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/User:Med...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-17 05:15 UTC by Nick Jenkins
Modified: 2011-03-13 18:06 UTC (History)
2 users (show)

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


Attachments

Description Nick Jenkins 2008-06-17 05:15:00 UTC
The 'MediaWiki default' user is used by MediaWiki as a system-level user, to record actions performed by MediaWiki itself or by extension. For example, the very first edit to initialise the "Main Page" on a new wiki is performed by the 'MediaWiki default' user.

However, this user does not seem to be created during wiki creation. ( Note: I have only tested this with 1.12.0 stable, and on a very quick examination it still looks like this is the case in SVN head, but I could be wrong ). As shown with an example database query:

---------------------------------
mysql> select * from user where user_name like 'MediaWiki default';
Empty set (0.00 sec)

mysql> select * from revision where rev_user_text = 'MediaWiki default';
+--------+----------+-------------+-------------+----------+-------------------+----------------+----------------+-------------+---------+---------------+
| rev_id | rev_page | rev_text_id | rev_comment | rev_user | rev_user_text     | rev_timestamp  | rev_minor_edit | rev_deleted | rev_len | rev_parent_id |
+--------+----------+-------------+-------------+----------+-------------------+----------------+----------------+-------------+---------+---------------+
|      1 |        1 |           1 |             |        0 | MediaWiki default | 20080522074310 |              0 |           0 |     449 |          NULL |
+--------+----------+-------------+-------------+----------+-------------------+----------------+----------------+-------------+---------+---------------+
1 row in set (0.00 sec)
---------------------------------

The 'MediaWiki default' user is referred to in ~ 7 places in core (grep -nr 'MediaWiki default' includes/ config/ maintenance/ ), and ~ 5 places in extensions (grep -nr 'MediaWiki default' extensions/ ). 

My primary concern is for logging - I would like to be able to add something to the log, from the 'MediaWiki default' user, and have it appear normally in [[Special:Log]]. However at the moment such
entries do not appear, because Special:Log performs a join between the user table and the logging table. One possible solution may be to create the 'MediaWiki default' user when creating the wiki, and possibly also when upgrading the wiki.
Comment 1 Brion Vibber 2008-06-19 16:27:51 UTC
Might be sensible to add it over in the installer, or it might be better actually to assign that installer edit to the initially-created sysop user...
Comment 2 Daniel Friesen 2008-06-19 22:53:26 UTC
I don't know about that. It's quite nice that MW makes automatic edits with a nonexistant user with id0. There are some setups where there may not even be an initial user. Namely Starter wiki like setups where a base db is created but not likely to have a user. Perhaps it would be best to create a "<System>" user with id0 which by definition cannot be logged into.
Comment 3 Chad H. 2008-06-20 12:59:09 UTC
I'm with Daniel on this. The auto-generated edits shouldn't be done by the wikisysop account, as that account isn't doing the editing. 

A userID of 0 for the "system" account makes it _really_ easy to check whether to allow things to be done to it (block, login, etc; none of which should be allowed).
Comment 4 Brion Vibber 2008-07-05 00:17:13 UTC
"There are some setups where there may not even be an initial user."

Well, that would exclude those created with the installer. :)

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


Navigation
Links