Index: branches/REL1_6/phase3/RELEASE-NOTES |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | * (bug 5184) CSS misapplied to elements in Special:Allmessages due to conflicting |
20 | 20 | anchor identifiers |
21 | 21 | * (bug 5519) Allow sidebar cache to be disabled; disable it by default. |
| 22 | +* Add $wgReservedUsernames configuration directive to block account creation/use |
22 | 23 | |
23 | 24 | |
24 | 25 | == MediaWiki 1.6.3 == |
— | — | @@ -30,7 +31,6 @@ |
31 | 32 | where some versions of MySQL 4.0.x wouldn't work |
32 | 33 | * Added note about $wgUrlProtocols format change |
33 | 34 | |
34 | | - |
35 | 35 | == MediaWiki 1.6.2 == |
36 | 36 | |
37 | 37 | April 8, 2006 |
— | — | @@ -43,7 +43,6 @@ |
44 | 44 | * Additional path fixes in the updater |
45 | 45 | * (bug 5344) Fix regression that broke slashes in extension tag parameters |
46 | 46 | |
47 | | - |
48 | 47 | == MediaWiki 1.6.1 == |
49 | 48 | |
50 | 49 | April 5, 2006 |
— | — | @@ -56,7 +55,6 @@ |
57 | 56 | * PHP warning when allow_call_time_pass_reference is off |
58 | 57 | * Update to Finnish localization |
59 | 58 | |
60 | | - |
61 | 59 | == MediaWiki 1.6.0 == |
62 | 60 | |
63 | 61 | April 5, 2006 |
Index: branches/REL1_6/phase3/includes/SpecialUserlogin.php |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | global $wgUser, $wgOut; |
166 | 166 | global $wgEnableSorbs, $wgProxyWhitelist; |
167 | 167 | global $wgMemc, $wgAccountCreationThrottle, $wgDBname; |
168 | | - global $wgAuth, $wgMinimalPasswordLength; |
| 168 | + global $wgAuth, $wgMinimalPasswordLength, $wgReservedUsernames; |
169 | 169 | |
170 | 170 | // If the user passes an invalid domain, something is fishy |
171 | 171 | if( !$wgAuth->validDomain( $this->mDomain ) ) { |
— | — | @@ -205,7 +205,7 @@ |
206 | 206 | |
207 | 207 | $name = trim( $this->mName ); |
208 | 208 | $u = User::newFromName( $name ); |
209 | | - if ( is_null( $u ) || $u->getName() == 'MediaWiki default' ) { |
| 209 | + if ( is_null( $u ) || in_array( $u->getName(), $wgReservedUsernames ) ) { |
210 | 210 | $this->mainLoginForm( wfMsg( 'noname' ) ); |
211 | 211 | return false; |
212 | 212 | } |
— | — | @@ -284,15 +284,14 @@ |
285 | 285 | * @access private |
286 | 286 | */ |
287 | 287 | function processLogin() { |
288 | | - global $wgUser; |
289 | | - global $wgAuth; |
| 288 | + global $wgUser, $wgAuth, $wgReservedUsernames; |
290 | 289 | |
291 | 290 | if ( '' == $this->mName ) { |
292 | 291 | $this->mainLoginForm( wfMsg( 'noname' ) ); |
293 | 292 | return; |
294 | 293 | } |
295 | 294 | $u = User::newFromName( $this->mName ); |
296 | | - if( is_null( $u ) || $u->getName() == 'MediaWiki default' ) { |
| 295 | + if( is_null( $u ) || in_array( $u->getName(), $wgReservedUsernames ) ) { |
297 | 296 | $this->mainLoginForm( wfMsg( 'noname' ) ); |
298 | 297 | return; |
299 | 298 | } |
Index: branches/REL1_6/phase3/includes/DefaultSettings.php |
— | — | @@ -1932,4 +1932,10 @@ |
1933 | 1933 | $wgAjaxExportList = array( 'wfSajaxSearch' ); |
1934 | 1934 | |
1935 | 1935 | |
| 1936 | +/** |
| 1937 | + * Array of usernames which may not be registered or logged in from |
| 1938 | + * Maintenance scripts can still use these |
| 1939 | + */ |
| 1940 | +$wgReservedUsernames = array( 'MediaWiki default', 'Conversion script' ); |
| 1941 | + |
1936 | 1942 | ?> |