Jump to content

Manual:$wgRateLimits: Difference between revisions

From mediawiki.org
Content deleted Content added
m make untranslatable
mNo edit summary
 
(7 intermediate revisions by 5 users not shown)
Line 34: Line 34:
* <code>user</code> - <translate><!--T:46--> applies to registered users only, and applies by action and user.</translate>
* <code>user</code> - <translate><!--T:46--> applies to registered users only, and applies by action and user.</translate>
* <code>user-global</code> - <translate><!--T:47--> (since 1.35) applies by action and registered user, counted across sites.</translate>
* <code>user-global</code> - <translate><!--T:47--> (since 1.35) applies by action and registered user, counted across sites.</translate>
* <code>newbie</code> - <translate><!--T:48--> applies to both unregistered and "newbie" users, and applies by action and user.</translate>
* <code>newbie</code> - <translate><!--T:48--> applies to unregistered, temporary and "newbie" users, and applies by action and user.</translate>
* <code>ip</code> - <translate><!--T:49--> applies to both unregistered and "newbie" users (i.e. users without the <tvar name=1><code>{{ll|Manual:Autoconfirmed users|autoconfirmed}}</code></tvar> user right), and will limit total number of action from one IP regardless of specific users.</translate> <translate><!--T:50--> This will be enforced ''in addition to'' other limits, and is counted across sites.</translate>
* <code>ip</code> - <translate><!--T:49--> applies to both unregistered and "newbie" users (i.e. users without the <tvar name=1><code>{{ll|Manual:Autoconfirmed users|autoconfirmed}}</code></tvar> user right), and will limit total number of action from one IP regardless of specific users.</translate> <translate><!--T:50--> This will be enforced ''in addition to'' other limits, and is counted across sites.</translate>
* <code>subnet</code> - <translate><!--T:51--> applies to both unregistered and "newbie" users, and will limit total number of action from the /24 (for IPv4) or /64 (for IPv6) range of IP.</translate> <translate><!--T:52--> This will be enforced ''in addition to'' other limits, and is counted across sites</translate>
* <code>subnet</code> - <translate><!--T:51--> applies to both unregistered and "newbie" users, and will limit total number of action from the /24 (for IPv4) or /64 (for IPv6) range of IP.</translate> <translate><!--T:52--> This will be enforced ''in addition to'' other limits, and is counted across sites.</translate>
* <code>ip-all</code> - <translate><!--T:53--> applies to all users other than those whose ''user-specific limit'' (see below) is more permissive, and will limit total number of action from one IP regardless of specific users.</translate> <translate><!--T:54--> This will be enforced ''in addition to'' other limits, and is counted across sites.</translate>
* <code>ip-all</code> - <translate><!--T:53--> applies to all users other than those whose ''user-specific limit'' (see below) is more permissive, and will limit total number of action from one IP regardless of specific users.</translate> <translate><!--T:54--> This will be enforced ''in addition to'' other limits, and is counted across sites.</translate>
* <code>subnet-all</code> - <translate><!--T:55--> applies to all users other than those whose ''user-specific limit'' is more permissive, and will limit total number of action from /24 or /64 range.</translate> <translate><!--T:56--> This will be enforced ''in addition to'' other limits, and is counted across sites.</translate>
* <code>subnet-all</code> - <translate><!--T:55--> applies to all users other than those whose ''user-specific limit'' is more permissive, and will limit total number of action from /24 or /64 range.</translate> <translate><!--T:56--> This will be enforced ''in addition to'' other limits, and is counted across sites.</translate>
Line 78: Line 78:
This will allow newbie users not more than 100 wrong answers per day (86400 seconds).
This will allow newbie users not more than 100 wrong answers per day (86400 seconds).


== Rate Limit Message == <!--T:65-->
== Rate limit message == <!--T:65-->
</translate>
</translate>
<translate><!--T:66--> After reaching the rate limit, either of two things will happen.</translate>
<translate><!--T:66--> After reaching the rate limit, either of two things will happen.</translate>
Line 84: Line 84:
<translate><!--T:68--> For edits or rollbacks, editors will see the following message:</translate>
<translate><!--T:68--> For edits or rollbacks, editors will see the following message:</translate>


=== {{int|actionthrottled}} ===
<div style="margin: auto 2em; border: 1px dashed #AAAAAA; padding: 4px; padding-left: 1em;">
<div style="margin: auto 2em; border: 1px dashed #AAAAAA; padding: 4px; padding-left: 1em;">
<h1> {{int|actionthrottled}} </h1>
{{int|actionthrottledtext}}
{{int|actionthrottledtext}}
</div>
</div>
Line 95: Line 95:
==Default value== <!--T:12-->
==Default value== <!--T:12-->
</translate>
</translate>
{{MW 1.39|+|gerrit change=805091}}
{{MW 1.41|+}}
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$wgRateLimits = [
$wgRateLimits = [
Line 124: Line 124:
],
],
// <translate nowrap><!--T:18--> Emailing other users using MediaWiki</translate>
// <translate nowrap><!--T:18--> Emailing other users using MediaWiki</translate>
'emailuser' => [
'sendemail' => [
'ip' => [ 5, 86400 ],
'ip' => [ 5, 86400 ],
'newbie' => [ 5, 86400 ],
'newbie' => [ 5, 86400 ],
Line 133: Line 133:
'user' => [ 4, 86400 ]
'user' => [ 4, 86400 ]
],
],
// since 1.33 - rate limit email confirmations
// <translate nowrap><!--T:71--> since 1.33 - rate limit email confirmations</translate>
'confirmemail' => [
'confirmemail' => [
'ip-all' => [ 10, 3600 ],
'ip-all' => [ 10, 3600 ],
Line 163: Line 163:
'newbie' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
],
],
// <translate><!--T:70--> Stash base HTML for VE edits</translate>
// <translate nowrap><!--T:70--> Stash base HTML for VE edits</translate>
'stashbasehtml' => [
'stashbasehtml' => [
'ip' => [ 5, 60 ],
'ip' => [ 5, 60 ],
Line 169: Line 169:
],
],
// <translate nowrap><!--T:38--> Adding or removing change tags</translate>
// <translate nowrap><!--T:38--> Adding or removing change tags</translate>
'changetags' => [
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
// <translate nowrap><!--T:72--> Changing the content model of a page</translate>
'editcontentmodel' => [
'newbie' => [ 2, 120 ],
'user' => [ 8, 60 ],
],
];
</syntaxhighlight>

{{MW version|version=1.39|version2=1.40|gerrit change=805091}}
<syntaxhighlight lang="php">
$wgRateLimits = [
// <translate nowrap><!--T:73--> Page edits</translate>
'edit' => [
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'user' => [ 90, 60 ],
],
// <translate nowrap><!--T:74--> Page moves</translate>
'move' => [
'newbie' => [ 2, 120 ],
'user' => [ 8, 60 ],
],
// <translate nowrap><!--T:75--> File uploads</translate>
'upload' => [
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
// <translate nowrap><!--T:76--> Page rollbacks</translate>
'rollback' => [
'user' => [ 10, 60 ],
'newbie' => [ 5, 120 ]
],
// <translate nowrap><!--T:77--> Triggering password resets emails</translate>
'mailpassword' => [
'ip' => [ 5, 3600 ],
],
// <translate nowrap><!--T:78--> Emailing other users using MediaWiki</translate>
'emailuser' => [
'ip' => [ 5, 86400 ],
'newbie' => [ 5, 86400 ],
'user' => [ 20, 86400 ],
],
'changeemail' => [
'ip-all' => [ 10, 3600 ],
'user' => [ 4, 86400 ]
],
// <translate nowrap><!--T:79--> since 1.33 - rate limit email confirmations</translate>
'confirmemail' => [
'ip-all' => [ 10, 3600 ],
'user' => [ 4, 86400 ]
],
// <translate nowrap><!--T:80--> Purging pages</translate>
'purge' => [
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
// <translate nowrap><!--T:81--> Purges of link tables</translate>
'linkpurge' => [
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
// <translate nowrap><!--T:82--> Files rendered via <tvar name=1>thumb.php</tvar> or <tvar name=2>thumb_handler.php</tvar></translate>
'renderfile' => [
'ip' => [ 700, 30 ],
'user' => [ 700, 30 ],
],
// <translate nowrap><!--T:83--> Same as above but for non-standard thumbnails</translate>
'renderfile-nonstandard' => [
'ip' => [ 70, 30 ],
'user' => [ 70, 30 ],
],
// <translate nowrap><!--T:84--> Stashing edits into cache before save</translate>
'stashedit' => [
'ip' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
],
// <translate nowrap><!--T:85--> Stash base HTML for VE edits</translate>
'stashbasehtml' => [
'ip' => [ 5, 60 ],
'newbie' => [ 5, 60 ],
],
// <translate nowrap><!--T:86--> Adding or removing change tags</translate>
'changetag' => [
'changetag' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
],
// Changing the content model of a page
// <translate nowrap><!--T:87--> Changing the content model of a page</translate>
'editcontentmodel' => [
'editcontentmodel' => [
'newbie' => [ 2, 120 ],
'newbie' => [ 2, 120 ],
Line 184: Line 270:
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$wgRateLimits = [
$wgRateLimits = [
// Page edits
// <translate nowrap><!--T:88--> Page edits</translate>
'edit' => [
'edit' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
Line 190: Line 276:
'user' => [ 90, 60 ],
'user' => [ 90, 60 ],
],
],
// Page moves
// <translate nowrap><!--T:89--> Page moves</translate>
'move' => [
'move' => [
'newbie' => [ 2, 120 ],
'newbie' => [ 2, 120 ],
'user' => [ 8, 60 ],
'user' => [ 8, 60 ],
],
],
// File uploads
// <translate nowrap><!--T:90--> File uploads</translate>
'upload' => [
'upload' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
],
// Page rollbacks
// <translate nowrap><!--T:91--> Page rollbacks</translate>
'rollback' => [
'rollback' => [
'user' => [ 10, 60 ],
'user' => [ 10, 60 ],
'newbie' => [ 5, 120 ]
'newbie' => [ 5, 120 ]
],
],
// Triggering password resets emails
// <translate nowrap><!--T:92--> Triggering password resets emails</translate>
'mailpassword' => [
'mailpassword' => [
'ip' => [ 5, 3600 ],
'ip' => [ 5, 3600 ],
],
],
// Emailing other users using MediaWiki
// <translate nowrap><!--T:93--> Emailing other users using MediaWiki</translate>
'emailuser' => [
'emailuser' => [
'ip' => [ 5, 86400 ],
'ip' => [ 5, 86400 ],
Line 219: Line 305:
'user' => [ 4, 86400 ]
'user' => [ 4, 86400 ]
],
],
// since 1.33 - rate limit email confirmations
// <translate nowrap><!--T:94--> since 1.33 - rate limit email confirmations</translate>
'confirmemail' => [
'confirmemail' => [
'ip-all' => [ 10, 3600 ],
'ip-all' => [ 10, 3600 ],
'user' => [ 4, 86400 ]
'user' => [ 4, 86400 ]
],
],
// Purging pages
// <translate nowrap><!--T:95--> Purging pages</translate>
'purge' => [
'purge' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
],
// Purges of link tables
// <translate nowrap><!--T:96--> Purges of link tables</translate>
'linkpurge' => [
'linkpurge' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
],
// Files rendered via thumb.php or thumb_handler.php
// <translate nowrap><!--T:97--> Files rendered via <tvar name=1>thumb.php</tvar> or <tvar name=2>thumb_handler.php</tvar></translate>
'renderfile' => [
'renderfile' => [
'ip' => [ 700, 30 ],
'ip' => [ 700, 30 ],
'user' => [ 700, 30 ],
'user' => [ 700, 30 ],
],
],
// Same as above but for non-standard thumbnails
// <translate nowrap><!--T:98--> Same as above but for non-standard thumbnails</translate>
'renderfile-nonstandard' => [
'renderfile-nonstandard' => [
'ip' => [ 70, 30 ],
'ip' => [ 70, 30 ],
'user' => [ 70, 30 ],
'user' => [ 70, 30 ],
],
],
// Stashing edits into cache before save
// <translate nowrap><!--T:99--> Stashing edits into cache before save</translate>
'stashedit' => [
'stashedit' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
],
],
// Adding or removing change tags
// <translate nowrap><!--T:100--> Adding or removing change tags</translate>
'changetag' => [
'changetag' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
],
// Changing the content model of a page
// <translate nowrap><!--T:101--> Changing the content model of a page</translate>
'editcontentmodel' => [
'editcontentmodel' => [
'newbie' => [ 2, 120 ],
'newbie' => [ 2, 120 ],
Line 266: Line 352:
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$wgRateLimits = [
$wgRateLimits = [
// Page edits
// <translate nowrap><!--T:102--> Page edits</translate>
'edit' => [
'edit' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
Line 272: Line 358:
'user' => [ 90, 60 ],
'user' => [ 90, 60 ],
],
],
// Page moves
// <translate nowrap><!--T:103--> Page moves</translate>
'move' => [
'move' => [
'newbie' => [ 2, 120 ],
'newbie' => [ 2, 120 ],
'user' => [ 8, 60 ],
'user' => [ 8, 60 ],
],
],
// File uploads
// <translate nowrap><!--T:104--> File uploads</translate>
'upload' => [
'upload' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
],
// Page rollbacks
// <translate nowrap><!--T:105--> Page rollbacks</translate>
'rollback' => [
'rollback' => [
'user' => [ 10, 60 ],
'user' => [ 10, 60 ],
'newbie' => [ 5, 120 ]
'newbie' => [ 5, 120 ]
],
],
// Triggering password resets emails
// <translate nowrap><!--T:106--> Triggering password resets emails</translate>
'mailpassword' => [
'mailpassword' => [
'ip' => [ 5, 3600 ],
'ip' => [ 5, 3600 ],
],
],
// Emailing other users using MediaWiki
// <translate nowrap><!--T:107--> Emailing other users using MediaWiki</translate>
'emailuser' => [
'emailuser' => [
'ip' => [ 5, 86400 ],
'ip' => [ 5, 86400 ],
Line 301: Line 387:
'user' => [ 4, 86400 ]
'user' => [ 4, 86400 ]
],
],
// Purging pages
// <translate nowrap><!--T:108--> Purging pages</translate>
'purge' => [
'purge' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
],
// Purges of link tables
// <translate nowrap><!--T:109--> Purges of link tables</translate>
'linkpurge' => [
'linkpurge' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
],
// Files rendered via thumb.php or thumb_handler.php
// <translate nowrap><!--T:110--> Files rendered via <tvar name=1>thumb.php</tvar> or <tvar name=2>thumb_handler.php</tvar></translate>
'renderfile' => [
'renderfile' => [
'ip' => [ 700, 30 ],
'ip' => [ 700, 30 ],
'user' => [ 700, 30 ],
'user' => [ 700, 30 ],
],
],
// Same as above but for non-standard thumbnails
// <translate nowrap><!--T:111--> Same as above but for non-standard thumbnails</translate>
'renderfile-nonstandard' => [
'renderfile-nonstandard' => [
'ip' => [ 70, 30 ],
'ip' => [ 70, 30 ],
'user' => [ 70, 30 ],
'user' => [ 70, 30 ],
],
],
// Stashing edits into cache before save
// <translate nowrap><!--T:112--> Stashing edits into cache before save</translate>
'stashedit' => [
'stashedit' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
],
],
// Adding or removing change tags
// <translate nowrap><!--T:113--> Adding or removing change tags</translate>
'changetag' => [
'changetag' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
],
// Changing the content model of a page
// <translate nowrap><!--T:114--> Changing the content model of a page</translate>
'editcontentmodel' => [
'editcontentmodel' => [
'newbie' => [ 2, 120 ],
'newbie' => [ 2, 120 ],
Line 342: Line 428:
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$wgRateLimits = [
$wgRateLimits = [
// Page edits
// <translate nowrap><!--T:115--> Page edits</translate>
'edit' => [
'edit' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
Line 348: Line 434:
'user' => [ 90, 60 ],
'user' => [ 90, 60 ],
],
],
// Page moves
// <translate nowrap><!--T:116--> Page moves</translate>
'move' => [
'move' => [
'newbie' => [ 2, 120 ],
'newbie' => [ 2, 120 ],
'user' => [ 8, 60 ],
'user' => [ 8, 60 ],
],
],
// File uploads
// <translate nowrap><!--T:117--> File uploads</translate>
'upload' => [
'upload' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
],
// Page rollbacks
// <translate nowrap><!--T:118--> Page rollbacks</translate>
'rollback' => [
'rollback' => [
'user' => [ 10, 60 ],
'user' => [ 10, 60 ],
'newbie' => [ 5, 120 ]
'newbie' => [ 5, 120 ]
],
],
// Triggering password resets emails
// <translate nowrap><!--T:119--> Triggering password resets emails</translate>
'mailpassword' => [
'mailpassword' => [
'ip' => [ 5, 3600 ],
'ip' => [ 5, 3600 ],
],
],
// Emailing other users using MediaWiki
// <translate nowrap><!--T:120--> Emailing other users using MediaWiki</translate>
'emailuser' => [
'emailuser' => [
'ip' => [ 5, 86400 ],
'ip' => [ 5, 86400 ],
Line 373: Line 459:
'user' => [ 20, 86400 ],
'user' => [ 20, 86400 ],
],
],
// Purging pages
// <translate nowrap><!--T:121--> Purging pages</translate>
'purge' => [
'purge' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
],
// Purges of link tables
// <translate nowrap><!--T:122--> Purges of link tables</translate>
'linkpurge' => [
'linkpurge' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
],
// Files rendered via thumb.php or thumb_handler.php
// <translate nowrap><!--T:123--> Files rendered via <tvar name=1>thumb.php</tvar> or <tvar name=2>thumb_handler.php</tvar></translate>
'renderfile' => [
'renderfile' => [
'ip' => [ 700, 30 ],
'ip' => [ 700, 30 ],
'user' => [ 700, 30 ],
'user' => [ 700, 30 ],
],
],
// Same as above but for non-standard thumbnails
// <translate nowrap><!--T:124--> Same as above but for non-standard thumbnails</translate>
'renderfile-nonstandard' => [
'renderfile-nonstandard' => [
'ip' => [ 70, 30 ],
'ip' => [ 70, 30 ],
'user' => [ 70, 30 ],
'user' => [ 70, 30 ],
],
],
// Stashing edits into cache before save
// <translate nowrap><!--T:125--> Stashing edits into cache before save</translate>
'stashedit' => [
'stashedit' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
],
],
// Adding or removing change tags
// <translate nowrap><!--T:126--> Adding or removing change tags</translate>
'changetag' => [
'changetag' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
],
// Changing the content model of a page
// <translate nowrap><!--T:127--> Changing the content model of a page</translate>
'editcontentmodel' => [
'editcontentmodel' => [
'newbie' => [ 2, 120 ],
'newbie' => [ 2, 120 ],
Line 414: Line 500:
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$wgRateLimits = [
$wgRateLimits = [
// Page edits
// <translate nowrap><!--T:128--> Page edits</translate>
'edit' => [
'edit' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
],
// Page moves
// <translate nowrap><!--T:129--> Page moves</translate>
'move' => [
'move' => [
'newbie' => [ 2, 120 ],
'newbie' => [ 2, 120 ],
'user' => [ 8, 60 ],
'user' => [ 8, 60 ],
],
],
// File uploads
// <translate nowrap><!--T:130--> File uploads</translate>
'upload' => [
'upload' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
],
// Page rollbacks
// <translate nowrap><!--T:131--> Page rollbacks</translate>
'rollback' => [
'rollback' => [
'user' => [ 10, 60 ],
'user' => [ 10, 60 ],
'newbie' => [ 5, 120 ]
'newbie' => [ 5, 120 ]
],
],
// Triggering password resets emails
// <translate nowrap><!--T:132--> Triggering password resets emails</translate>
'mailpassword' => [
'mailpassword' => [
'ip' => [ 5, 3600 ],
'ip' => [ 5, 3600 ],
],
],
// Emailing other users using MediaWiki
// <translate nowrap><!--T:133--> Emailing other users using MediaWiki</translate>
'emailuser' => [
'emailuser' => [
'ip' => [ 5, 86400 ],
'ip' => [ 5, 86400 ],
Line 444: Line 530:
'user' => [ 20, 86400 ],
'user' => [ 20, 86400 ],
],
],
// Purging pages
// <translate nowrap><!--T:134--> Purging pages</translate>
'purge' => [
'purge' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
],
// Purges of link tables
// <translate nowrap><!--T:135--> Purges of link tables</translate>
'linkpurge' => [
'linkpurge' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
],
// Files rendered via thumb.php or thumb_handler.php
// <translate nowrap><!--T:136--> Files rendered via <tvar name=1>thumb.php</tvar> or <tvar name=2>thumb_handler.php</tvar></translate>
'renderfile' => [
'renderfile' => [
'ip' => [ 700, 30 ],
'ip' => [ 700, 30 ],
'user' => [ 700, 30 ],
'user' => [ 700, 30 ],
],
],
// Same as above but for non-standard thumbnails
// <translate nowrap><!--T:137--> Same as above but for non-standard thumbnails</translate>
'renderfile-nonstandard' => [
'renderfile-nonstandard' => [
'ip' => [ 70, 30 ],
'ip' => [ 70, 30 ],
'user' => [ 70, 30 ],
'user' => [ 70, 30 ],
],
],
// Stashing edits into cache before save
// <translate nowrap><!--T:138--> Stashing edits into cache before save</translate>
'stashedit' => [
'stashedit' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
],
],
// Adding or removing change tags
// <translate nowrap><!--T:139--> Adding or removing change tags</translate>
'changetag' => [
'changetag' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
],
// Changing the content model of a page
// <translate nowrap><!--T:140--> Changing the content model of a page</translate>
'editcontentmodel' => [
'editcontentmodel' => [
'newbie' => [ 2, 120 ],
'newbie' => [ 2, 120 ],
Line 485: Line 571:
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$wgRateLimits = [
$wgRateLimits = [
// Page edits
// <translate nowrap><!--T:141--> Page edits</translate>
'edit' => [
'edit' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
Line 491: Line 577:
'user' => [ 90, 60 ],
'user' => [ 90, 60 ],
],
],
// Page moves
// <translate nowrap><!--T:142--> Page moves</translate>
'move' => [
'move' => [
'newbie' => [ 2, 120 ],
'newbie' => [ 2, 120 ],
'user' => [ 8, 60 ],
'user' => [ 8, 60 ],
],
],
// File uploads
// <translate nowrap><!--T:143--> File uploads</translate>
'upload' => [
'upload' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
'newbie' => [ 8, 60 ],
],
],
// Page rollbacks
// <translate nowrap><!--T:144--> Page rollbacks</translate>
'rollback' => [
'rollback' => [
'user' => [ 10, 60 ],
'user' => [ 10, 60 ],
'newbie' => [ 5, 120 ]
'newbie' => [ 5, 120 ]
],
],
// Triggering password resets emails
// <translate nowrap><!--T:145--> Triggering password resets emails</translate>
'mailpassword' => [
'mailpassword' => [
'ip' => [ 5, 3600 ],
'ip' => [ 5, 3600 ],
],
],
// Emailing other users using MediaWiki
// <translate nowrap><!--T:146--> Emailing other users using MediaWiki</translate>
'emailuser' => [
'emailuser' => [
'ip' => [ 5, 86400 ],
'ip' => [ 5, 86400 ],
Line 520: Line 606:
'user' => [ 4, 86400 ]
'user' => [ 4, 86400 ]
],
],
// Purging pages
// <translate nowrap><!--T:147--> Purging pages</translate>
'purge' => [
'purge' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
],
// Purges of link tables
// <translate nowrap><!--T:148--> Purges of link tables</translate>
'linkpurge' => [
'linkpurge' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'user' => [ 30, 60 ],
'user' => [ 30, 60 ],
],
],
// Files rendered via thumb.php or thumb_handler.php
// <translate nowrap><!--T:149--> Files rendered via <tvar name=1>thumb.php</tvar> or <tvar name=2>thumb_handler.php</tvar></translate>
'renderfile' => [
'renderfile' => [
'ip' => [ 700, 30 ],
'ip' => [ 700, 30 ],
'user' => [ 700, 30 ],
'user' => [ 700, 30 ],
],
],
// Same as above but for non-standard thumbnails
// <translate nowrap><!--T:150--> Same as above but for non-standard thumbnails</translate>
'renderfile-nonstandard' => [
'renderfile-nonstandard' => [
'ip' => [ 70, 30 ],
'ip' => [ 70, 30 ],
'user' => [ 70, 30 ],
'user' => [ 70, 30 ],
],
],
// Stashing edits into cache before save
// <translate nowrap><!--T:151--> Stashing edits into cache before save</translate>
'stashedit' => [
'stashedit' => [
'ip' => [ 30, 60 ],
'ip' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
'newbie' => [ 30, 60 ],
],
],
// Adding or removing change tags
// <translate nowrap><!--T:152--> Adding or removing change tags</translate>
'changetag' => [
'changetag' => [
'ip' => [ 8, 60 ],
'ip' => [ 8, 60 ],
Line 557: Line 643:
$wgRateLimits = array(
$wgRateLimits = array(
'edit' => array(
'edit' => array(
'anon' => null, // for any and all anonymous edits (aggregate)
'anon' => null, // <translate nowrap><!--T:153--> for any and all anonymous edits (aggregate)</translate>
'user' => null, // for each logged-in user
'user' => null, // <translate nowrap><!--T:154--> for each logged-in user</translate>
'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
'newbie' => null, // <translate nowrap><!--T:155--> for each recent (autoconfirmed) account; overrides 'user'</translate>
'ip' => null, // for each anon and recent account
'ip' => null, // <translate nowrap><!--T:156--> for each anon and recent account</translate>
'subnet' => null, // ... within a /24 subnet in IPv4 or /64 in IPv6
'subnet' => null, // <translate nowrap><!--T:157--> ... within a /24 subnet in IPv4 or /64 in IPv6</translate>
),
),
'upload' => array(
'upload' => array(
Line 575: Line 661:
'subnet' => null,
'subnet' => null,
),
),
'mailpassword' => array( // triggering password resets emails
'mailpassword' => array( // <translate nowrap><!--T:158--> triggering password resets emails</translate>
'anon' => null,
'anon' => null,
),
),
'emailuser' => array( // emailing other users using MediaWiki
'emailuser' => array( // <translate nowrap><!--T:159--> emailing other users using MediaWiki</translate>
'user' => null,
'user' => null,
),
),
'linkpurge' => array( // purges of link tables
'linkpurge' => array( // <translate nowrap><!--T:160--> purges of link tables</translate>
'anon' => null,
'anon' => null,
'user' => null,
'user' => null,
Line 588: Line 674:
'subnet' => null,
'subnet' => null,
),
),
'renderfile' => array( // files rendered via thumb.php or thumb_handler.php
'renderfile' => array( // <translate nowrap><!--T:161--> files rendered via <tvar name=1>thumb.php</tvar> or <tvar name=2>thumb_handler.php</tvar></translate>
'anon' => null,
'anon' => null,
'user' => null,
'user' => null,
Line 595: Line 681:
'subnet' => null,
'subnet' => null,
),
),
'renderfile-nonstandard' => array( // same as above but for non-standard thumbnails
'renderfile-nonstandard' => array( // <translate nowrap><!--T:162--> same as above but for non-standard thumbnails</translate>
'anon' => null,
'anon' => null,
'user' => null,
'user' => null,
Line 602: Line 688:
'subnet' => null,
'subnet' => null,
),
),
'stashedit' => array( // stashing edits into cache before save
'stashedit' => array( // <translate nowrap><!--T:163--> stashing edits into cache before save</translate>
'anon' => null,
'anon' => null,
'user' => null,
'user' => null,
Line 609: Line 695:
'subnet' => null,
'subnet' => null,
),
),
'changetag' => array( // adding or removing change tags
'changetag' => array( // <translate nowrap><!--T:164--> adding or removing change tags</translate>
'user' => null,
'user' => null,
'newbie' => null,
'newbie' => null,
Line 620: Line 706:
$wgRateLimits = array(
$wgRateLimits = array(
'edit' => array(
'edit' => array(
'anon' => null, // for any and all anonymous edits (aggregate)
'anon' => null, // <translate nowrap><!--T:165--> for any and all anonymous edits (aggregate)</translate>
'user' => null, // for each logged-in user
'user' => null, // <translate nowrap><!--T:166--> for each logged-in user</translate>
'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
'newbie' => null, // <translate nowrap><!--T:167--> for each recent (autoconfirmed) account; overrides 'user'</translate>
'ip' => null, // for each anon and recent account
'ip' => null, // <translate nowrap><!--T:168--> for each anon and recent account</translate>
'subnet' => null, // ... within a /24 subnet in IPv4 or /64 in IPv6
'subnet' => null, // <translate nowrap><!--T:169--> ... within a /24 subnet in IPv4 or /64 in IPv6</translate>
),
),
'upload' => array(
'upload' => array(
Line 638: Line 724:
'subnet' => null,
'subnet' => null,
),
),
'mailpassword' => array( // triggering password resets emails
'mailpassword' => array( // <translate nowrap><!--T:170--> triggering password resets emails</translate>
'anon' => null,
'anon' => null,
),
),
'emailuser' => array( // emailing other users using MediaWiki
'emailuser' => array( // <translate nowrap><!--T:171--> emailing other users using MediaWiki</translate>
'user' => null,
'user' => null,
),
),
'linkpurge' => array( // purges of link tables
'linkpurge' => array( // <translate nowrap><!--T:172--> purges of link tables</translate>
'anon' => null,
'anon' => null,
'user' => null,
'user' => null,
Line 651: Line 737:
'subnet' => null,
'subnet' => null,
),
),
'renderfile' => array( // files rendered via thumb.php or thumb_handler.php
'renderfile' => array( // <translate nowrap><!--T:173--> files rendered via <tvar name=1>thumb.php</tvar> or <tvar name=2>thumb_handler.php</tvar></translate>
'anon' => null,
'anon' => null,
'user' => null,
'user' => null,
Line 658: Line 744:
'subnet' => null,
'subnet' => null,
),
),
'renderfile-nonstandard' => array( // same as above but for non-standard thumbnails
'renderfile-nonstandard' => array( // <translate nowrap><!--T:174--> same as above but for non-standard thumbnails</translate>
'anon' => null,
'anon' => null,
'user' => null,
'user' => null,
Line 672: Line 758:
$wgRateLimits = array(
$wgRateLimits = array(
'edit' => array(
'edit' => array(
'anon' => null, // for any and all anonymous edits (aggregate)
'anon' => null, // <translate nowrap><!--T:175--> for any and all anonymous edits (aggregate)</translate>
'user' => null, // for each logged-in user
'user' => null, // <translate nowrap><!--T:176--> for each logged-in user</translate>
'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
'newbie' => null, // <translate nowrap><!--T:177--> for each recent (autoconfirmed) account; overrides 'user'</translate>
'ip' => null, // for each anon and recent account
'ip' => null, // <translate nowrap><!--T:178--> for each anon and recent account</translate>
'subnet' => null, // ... within a /24 subnet in IPv4 or /64 in IPv6
'subnet' => null, // <translate nowrap><!--T:179--> ... within a /24 subnet in IPv4 or /64 in IPv6</translate>
),
),
'upload' => array(
'upload' => array(
Line 690: Line 776:
'subnet' => null,
'subnet' => null,
),
),
'mailpassword' => array( // triggering password resets emails
'mailpassword' => array( // <translate nowrap><!--T:180--> triggering password resets emails</translate>
'anon' => null,
'anon' => null,
),
),
'emailuser' => array( // emailing other users using MediaWiki
'emailuser' => array( // <translate nowrap><!--T:181--> emailing other users using MediaWiki</translate>
'user' => null,
'user' => null,
),
),
'linkpurge' => array( // purges of link tables
'linkpurge' => array( // <translate nowrap><!--T:182--> purges of link tables</translate>
'anon' => null,
'anon' => null,
'user' => null,
'user' => null,
Line 703: Line 789:
'subnet' => null,
'subnet' => null,
),
),
'renderfile' => array( // files rendered via thumb.php or thumb_handler.php
'renderfile' => array( // <translate nowrap><!--T:183--> files rendered via <tvar name=1>thumb.php</tvar> or <tvar name=2>thumb_handler.php</tvar></translate>
'anon' => null,
'anon' => null,
'user' => null,
'user' => null,
Line 717: Line 803:
$wgRateLimits = array(
$wgRateLimits = array(
'edit' => array(
'edit' => array(
'anon' => null, // for any and all anonymous edits (aggregate)
'anon' => null, // <translate nowrap><!--T:184--> for any and all anonymous edits (aggregate)</translate>
'user' => null, // for each logged-in user
'user' => null, // <translate nowrap><!--T:185--> for each logged-in user</translate>
'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
'newbie' => null, // <translate nowrap><!--T:186--> for each recent (autoconfirmed) account; overrides 'user'</translate>
'ip' => null, // for each anon and recent account
'ip' => null, // <translate nowrap><!--T:187--> for each anon and recent account</translate>
'subnet' => null, // ... within a /24 subnet in IPv4 or /64 in IPv6
'subnet' => null, // <translate nowrap><!--T:188-->
... within a /24 subnet in IPv4 or /64 in IPv6
),</translate>
),
'move' => array(
'move' => array(
'user' => null,
'user' => null,
Line 729: Line 816:
'subnet' => null,
'subnet' => null,
),
),
'mailpassword' => array( // triggering password resets emails
'mailpassword' => array( // <translate nowrap><!--T:189--> triggering password resets emails</translate>
'anon' => null,
'anon' => null,
),
),
'emailuser' => array( // emailing other users using MediaWiki
'emailuser' => array( // <translate nowrap><!--T:190--> emailing other users using MediaWiki</translate>
'user' => null,
'user' => null,
),
),
'linkpurge' => array( // purges of link tables
'linkpurge' => array( // <translate nowrap><!--T:191--> purges of link tables</translate>
'anon' => null,
'anon' => null,
'user' => null,
'user' => null,
Line 742: Line 829:
'subnet' => null,
'subnet' => null,
),
),
'renderfile' => array( // files rendered via thumb.php or thumb_handler.php
'renderfile' => array( // <translate nowrap><!--T:192--> files rendered via <tvar name=1>thumb.php</tvar> or <tvar name=2>thumb_handler.php</tvar></translate>
'anon' => null,
'anon' => null,
'user' => null,
'user' => null,
Line 756: Line 843:
$wgRateLimits = array(
$wgRateLimits = array(
'edit' => array(
'edit' => array(
'anon' => null, // for any and all anonymous edits (aggregate)
'anon' => null, // <translate nowrap><!--T:193--> for any and all anonymous edits (aggregate)</translate>
'user' => null, // for each logged-in user
'user' => null, // <translate nowrap><!--T:194--> for each logged-in user</translate>
'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
'newbie' => null, // <translate nowrap><!--T:195--> for each recent (autoconfirmed) account; overrides 'user'</translate>
'ip' => null, // for each anon and recent account
'ip' => null, // <translate nowrap><!--T:196--> for each anon and recent account</translate>
'subnet' => null, // ... with final octet removed
'subnet' => null, // <translate nowrap><!--T:197--> ... with final octet removed</translate>
),
),
'move' => array(
'move' => array(
Line 781: Line 868:
$wgRateLimits = array(
$wgRateLimits = array(
'edit' => array(
'edit' => array(
'anon' => null, // for any and all anonymous edits (aggregate)
'anon' => null, // <translate nowrap><!--T:198--> for any and all anonymous edits (aggregate)</translate>
'user' => null, // for each logged-in user
'user' => null, // <translate nowrap><!--T:199--> for each logged-in user</translate>
'newbie' => null, // for each recent account; overrides 'user'
'newbie' => null, // <translate nowrap><!--T:200--> for each recent account; overrides 'user'</translate>
'ip' => null, // for each anon and recent account
'ip' => null, // <translate nowrap><!--T:201--> for each anon and recent account</translate>
'subnet' => null, // ... with final octet removed
'subnet' => null, // <translate nowrap><!--T:202--> ... with final octet removed</translate>
),
),
'move' => array(
'move' => array(
Line 804: Line 891:
$wgRateLimits = array(
$wgRateLimits = array(
'edit' => array(
'edit' => array(
'anon' => null, // for any and all anonymous edits (aggregate)
'anon' => null, // <translate nowrap><!--T:203--> for any and all anonymous edits (aggregate)</translate>
'user' => null, // for each logged-in user
'user' => null, // <translate nowrap><!--T:204--> for each logged-in user</translate>
'newbie' => null, // for each recent account; overrides 'user'
'newbie' => null, // <translate nowrap><!--T:205--> for each recent account; overrides 'user'</translate>
'ip' => null, // for each anon and recent account
'ip' => null, // <translate nowrap><!--T:206--> for each anon and recent account</translate>
'subnet' => null, // ... with final octet removed
'subnet' => null, // <translate nowrap><!--T:207--> ... with final octet removed</translate>
),
),
'move' => array(
'move' => array(
Line 832: Line 919:
<translate>
<translate>
<!--T:25-->
<!--T:25-->
* The 'renderfile' array was added in MediaWiki 1.22.0.
* The 'renderfile' array was added in MediaWiki 1.22.0.</translate>


<translate>
==See also== <!--T:26-->
==See also== <!--T:26-->
</translate>
</translate>

Latest revision as of 07:04, 6 September 2024

User rights, access control and monitoring: $wgRateLimits
Simple rate limiter options to brake edit floods.
Introduced in version:1.4.5
Removed in version:Still in use
Allowed values:Unspecified
Default value:see below

Details

[edit]
Warning Warning: $wgMainCacheType must be set to a value other than CACHE_NONE for rate limits to be enabled at all. It's CACHE_NONE by default, so if it's left at that, anything documented below will not work as expected.

This setting provides a simple rate limiter to brake floods of edits and other potentially destructive behavior, like sending out emails to other users. It sets a maximum number of actions allowed in the given number of seconds; after that, the violating client receives HTTP 429 error page or other error message until the period elapses. Note that limits are generally counted per site, but some of the special limits are aggregated across all sites in a wiki farm, e.g. all Wikimedia wikis. To check if a rate limit has been exceeded, use the User::pingLimiter() function.

The general syntax is:

$wgRateLimits['<action>']['<usergroup>'] = [ <maximum number of action>, <timespan in second> ];

There are some special additional limits:

  • anon - applies to unregistered users only, and applies by action and IP.
  • user - applies to registered users only, and applies by action and user.
  • user-global - (since 1.35) applies by action and registered user, counted across sites.
  • newbie - applies to unregistered, temporary and "newbie" users, and applies by action and user.
  • ip - applies to both unregistered and "newbie" users (i.e. users without the autoconfirmed user right), and will limit total number of action from one IP regardless of specific users. This will be enforced in addition to other limits, and is counted across sites.
  • subnet - applies to both unregistered and "newbie" users, and will limit total number of action from the /24 (for IPv4) or /64 (for IPv6) range of IP. This will be enforced in addition to other limits, and is counted across sites.
  • ip-all - applies to all users other than those whose user-specific limit (see below) is more permissive, and will limit total number of action from one IP regardless of specific users. This will be enforced in addition to other limits, and is counted across sites.
  • subnet-all - applies to all users other than those whose user-specific limit is more permissive, and will limit total number of action from /24 or /64 range. This will be enforced in addition to other limits, and is counted across sites.

If there are multiple limit defined, the user-specific limit is defined as:

  • newbie - if the user is a "newbie", or
  • The most permissive (i.e. with the highest action/timespan ratio) of user limit and all applicable user group limits of the user, or
  • anon - for unregistered users.

All user groups defined in $wgAutopromote (for example, autoconfirmed) will not be checked unless you explicitly assigned the user group to a specific user.

For example, to set a maximum of 4 edits per 60 seconds for "newbie" (i.e. non-autoconfirmed) users, add the following:

$wgRateLimits['edit']['newbie'] = [ 4, 60 ];
If you have many newbies using the same IP address, they all aggregate in the same count for the ip limit. This might have wanted and unwanted effects. If you for example have a code sprint with a huge number of (legitimate) new users, they might hit the IP limit rather quickly, which might be unwanted. On the other hand, spammers who use several different accounts from the same IP address will hit it as well, which will be wanted.

By setting $wgRateLimits['anAction']['&can-bypass'] = false; the limitations for a specific action can be marked as not skippable. If that is set, neither the noratelimit user right nor the $wgRateLimitsExcludedIPs setting have any effect for that action.

Extensions can provide additional keys for $wgRateLimit. E.g. Extension:ConfirmEdit provides a "badcaptcha" key, which allows to throttle users based on the number of wrong answers they have given to a captcha. An example might be:

$wgRateLimits['badcaptcha']['newbie'] = [ 100, 86400 ];

This will allow newbie users not more than 100 wrong answers per day (86400 seconds).

Rate limit message

[edit]

After reaching the rate limit, either of two things will happen. For purges, the purge dialogue will disappear. For edits or rollbacks, editors will see the following message:

Action throttled

[edit]

As an anti-abuse measure, you are limited from performing this action too many times in a short space of time, and you have exceeded this limit. Please try again in a few minutes.

This message can be modified by editing MediaWiki:Actionthrottled and MediaWiki:Actionthrottledtext.

Default value

[edit]
MediaWiki version:
1.41
$wgRateLimits = [
	// Page edits
	'edit' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
		'user' => [ 90, 60 ],
	],
	// Page moves
	'move' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
	// File uploads
	'upload' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Page rollbacks
	'rollback' => [
		'user' => [ 10, 60 ],
		'newbie' => [ 5, 120 ]
	],
	// Triggering password resets emails
	'mailpassword' => [
		'ip' => [ 5, 3600 ],
	],
	// Emailing other users using MediaWiki
	'sendemail' => [
		'ip' => [ 5, 86400 ],
		'newbie' => [ 5, 86400 ],
		'user' => [ 20, 86400 ],
	],
	'changeemail' => [
		'ip-all' => [ 10, 3600 ],
		'user' => [ 4, 86400 ]
	],
	// since 1.33 - rate limit email confirmations
	'confirmemail' => [
		'ip-all' => [ 10, 3600 ],
		'user' => [ 4, 86400 ]
	],
	// Purging pages
	'purge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Purges of link tables
	'linkpurge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Files rendered via thumb.php or thumb_handler.php
	'renderfile' => [
		'ip' => [ 700, 30 ],
		'user' => [ 700, 30 ],
	],
	// Same as above but for non-standard thumbnails
	'renderfile-nonstandard' => [
		'ip' => [ 70, 30 ],
		'user' => [ 70, 30 ],
	],
	// Stashing edits into cache before save
	'stashedit' => [
		'ip' => [ 30, 60 ],
		'newbie' => [ 30, 60 ],
	],
	// Stash base HTML for VE edits
	'stashbasehtml' => [
		'ip' => [ 5, 60 ],
		'newbie' => [ 5, 60 ],
	],
	// Adding or removing change tags
	'changetags' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Changing the content model of a page
	'editcontentmodel' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
];
MediaWiki versions:
1.39 – 1.40
Gerrit change 805091
$wgRateLimits = [
	// Page edits
	'edit' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
		'user' => [ 90, 60 ],
	],
	// Page moves
	'move' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
	// File uploads
	'upload' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Page rollbacks
	'rollback' => [
		'user' => [ 10, 60 ],
		'newbie' => [ 5, 120 ]
	],
	// Triggering password resets emails
	'mailpassword' => [
		'ip' => [ 5, 3600 ],
	],
	// Emailing other users using MediaWiki
	'emailuser' => [
		'ip' => [ 5, 86400 ],
		'newbie' => [ 5, 86400 ],
		'user' => [ 20, 86400 ],
	],
	'changeemail' => [
		'ip-all' => [ 10, 3600 ],
		'user' => [ 4, 86400 ]
	],
	// since 1.33 - rate limit email confirmations
	'confirmemail' => [
		'ip-all' => [ 10, 3600 ],
		'user' => [ 4, 86400 ]
	],
	// Purging pages
	'purge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Purges of link tables
	'linkpurge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Files rendered via thumb.php or thumb_handler.php
	'renderfile' => [
		'ip' => [ 700, 30 ],
		'user' => [ 700, 30 ],
	],
	// Same as above but for non-standard thumbnails
	'renderfile-nonstandard' => [
		'ip' => [ 70, 30 ],
		'user' => [ 70, 30 ],
	],
	// Stashing edits into cache before save
	'stashedit' => [
		'ip' => [ 30, 60 ],
		'newbie' => [ 30, 60 ],
	],
	// Stash base HTML for VE edits
	'stashbasehtml' => [
		'ip' => [ 5, 60 ],
		'newbie' => [ 5, 60 ],
	],
	// Adding or removing change tags
	'changetag' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Changing the content model of a page
	'editcontentmodel' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
];
MediaWiki versions:
1.34 – 1.38
$wgRateLimits = [
	// Page edits
	'edit' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
		'user' => [ 90, 60 ],
	],
	// Page moves
	'move' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
	// File uploads
	'upload' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Page rollbacks
	'rollback' => [
		'user' => [ 10, 60 ],
		'newbie' => [ 5, 120 ]
	],
	// Triggering password resets emails
	'mailpassword' => [
		'ip' => [ 5, 3600 ],
	],
	// Emailing other users using MediaWiki
	'emailuser' => [
		'ip' => [ 5, 86400 ],
		'newbie' => [ 5, 86400 ],
		'user' => [ 20, 86400 ],
	],
	'changeemail' => [
		'ip-all' => [ 10, 3600 ],
		'user' => [ 4, 86400 ]
	],
	// since 1.33 - rate limit email confirmations
	'confirmemail' => [
		'ip-all' => [ 10, 3600 ],
		'user' => [ 4, 86400 ]
	],
	// Purging pages
	'purge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Purges of link tables
	'linkpurge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Files rendered via thumb.php or thumb_handler.php
	'renderfile' => [
		'ip' => [ 700, 30 ],
		'user' => [ 700, 30 ],
	],
	// Same as above but for non-standard thumbnails
	'renderfile-nonstandard' => [
		'ip' => [ 70, 30 ],
		'user' => [ 70, 30 ],
	],
	// Stashing edits into cache before save
	'stashedit' => [
		'ip' => [ 30, 60 ],
		'newbie' => [ 30, 60 ],
	],
	// Adding or removing change tags
	'changetag' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Changing the content model of a page
	'editcontentmodel' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
];
Extended content
MediaWiki versions:
1.30 – 1.33
$wgRateLimits = [
	// Page edits
	'edit' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
		'user' => [ 90, 60 ],
	],
	// Page moves
	'move' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
	// File uploads
	'upload' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Page rollbacks
	'rollback' => [
		'user' => [ 10, 60 ],
		'newbie' => [ 5, 120 ]
	],
	// Triggering password resets emails
	'mailpassword' => [
		'ip' => [ 5, 3600 ],
	],
	// Emailing other users using MediaWiki
	'emailuser' => [
		'ip' => [ 5, 86400 ],
		'newbie' => [ 5, 86400 ],
		'user' => [ 20, 86400 ],
	],
	'changeemail' => [
		'ip-all' => [ 10, 3600 ],
		'user' => [ 4, 86400 ]
	],
	// Purging pages
	'purge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Purges of link tables
	'linkpurge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Files rendered via thumb.php or thumb_handler.php
	'renderfile' => [
		'ip' => [ 700, 30 ],
		'user' => [ 700, 30 ],
	],
	// Same as above but for non-standard thumbnails
	'renderfile-nonstandard' => [
		'ip' => [ 70, 30 ],
		'user' => [ 70, 30 ],
	],
	// Stashing edits into cache before save
	'stashedit' => [
		'ip' => [ 30, 60 ],
		'newbie' => [ 30, 60 ],
	],
	// Adding or removing change tags
	'changetag' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Changing the content model of a page
	'editcontentmodel' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
];
MediaWiki version:
1.29
$wgRateLimits = [
	// Page edits
	'edit' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
		'user' => [ 90, 60 ],
	],
	// Page moves
	'move' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
	// File uploads
	'upload' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Page rollbacks
	'rollback' => [
		'user' => [ 10, 60 ],
		'newbie' => [ 5, 120 ]
	],
	// Triggering password resets emails
	'mailpassword' => [
		'ip' => [ 5, 3600 ],
	],
	// Emailing other users using MediaWiki
	'emailuser' => [
		'ip' => [ 5, 86400 ],
		'newbie' => [ 5, 86400 ],
		'user' => [ 20, 86400 ],
	],
	// Purging pages
	'purge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Purges of link tables
	'linkpurge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Files rendered via thumb.php or thumb_handler.php
	'renderfile' => [
		'ip' => [ 700, 30 ],
		'user' => [ 700, 30 ],
	],
	// Same as above but for non-standard thumbnails
	'renderfile-nonstandard' => [
		'ip' => [ 70, 30 ],
		'user' => [ 70, 30 ],
	],
	// Stashing edits into cache before save
	'stashedit' => [
		'ip' => [ 30, 60 ],
		'newbie' => [ 30, 60 ],
	],
	// Adding or removing change tags
	'changetag' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Changing the content model of a page
	'editcontentmodel' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
];
MediaWiki version:
1.28
$wgRateLimits = [
	// Page edits
	'edit' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Page moves
	'move' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
	// File uploads
	'upload' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Page rollbacks
	'rollback' => [
		'user' => [ 10, 60 ],
		'newbie' => [ 5, 120 ]
	],
	// Triggering password resets emails
	'mailpassword' => [
		'ip' => [ 5, 3600 ],
	],
	// Emailing other users using MediaWiki
	'emailuser' => [
		'ip' => [ 5, 86400 ],
		'newbie' => [ 5, 86400 ],
		'user' => [ 20, 86400 ],
	],
	// Purging pages
	'purge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Purges of link tables
	'linkpurge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Files rendered via thumb.php or thumb_handler.php
	'renderfile' => [
		'ip' => [ 700, 30 ],
		'user' => [ 700, 30 ],
	],
	// Same as above but for non-standard thumbnails
	'renderfile-nonstandard' => [
		'ip' => [ 70, 30 ],
		'user' => [ 70, 30 ],
	],
	// Stashing edits into cache before save
	'stashedit' => [
		'ip' => [ 30, 60 ],
		'newbie' => [ 30, 60 ],
	],
	// Adding or removing change tags
	'changetag' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Changing the content model of a page
	'editcontentmodel' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
];
MediaWiki version:
1.27
$wgRateLimits = [
	// Page edits
	'edit' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
		'user' => [ 90, 60 ],
	],
	// Page moves
	'move' => [
		'newbie' => [ 2, 120 ],
		'user' => [ 8, 60 ],
	],
	// File uploads
	'upload' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
	// Page rollbacks
	'rollback' => [
		'user' => [ 10, 60 ],
		'newbie' => [ 5, 120 ]
	],
	// Triggering password resets emails
	'mailpassword' => [
		'ip' => [ 5, 3600 ],
	],
	// Emailing other users using MediaWiki
	'emailuser' => [
		'ip' => [ 5, 86400 ],
		'newbie' => [ 5, 86400 ],
		'user' => [ 20, 86400 ],
	],
	'changeemail' => [
		'ip-all' => [ 10, 3600 ],
		'user' => [ 4, 86400 ]
	],
	// Purging pages
	'purge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Purges of link tables
	'linkpurge' => [
		'ip' => [ 30, 60 ],
		'user' => [ 30, 60 ],
	],
	// Files rendered via thumb.php or thumb_handler.php
	'renderfile' => [
		'ip' => [ 700, 30 ],
		'user' => [ 700, 30 ],
	],
	// Same as above but for non-standard thumbnails
	'renderfile-nonstandard' => [
		'ip' => [ 70, 30 ],
		'user' => [ 70, 30 ],
	],
	// Stashing edits into cache before save
	'stashedit' => [
		'ip' => [ 30, 60 ],
		'newbie' => [ 30, 60 ],
	],
	// Adding or removing change tags
	'changetag' => [
		'ip' => [ 8, 60 ],
		'newbie' => [ 8, 60 ],
	],
];
MediaWiki versions:
1.25 – 1.26
$wgRateLimits = array(
	'edit' => array(
		'anon' => null, // for any and all anonymous edits (aggregate)
		'user' => null, // for each logged-in user
		'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
		'ip' => null, // for each anon and recent account
		'subnet' => null, // ... within a /24 subnet in IPv4 or /64 in IPv6
	),
	'upload' => array(
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'move' => array(
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'mailpassword' => array( // triggering password resets emails
		'anon' => null,
	),
	'emailuser' => array( // emailing other users using MediaWiki
		'user' => null,
	),
	'linkpurge' => array( // purges of link tables
		'anon' => null,
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'renderfile' => array( // files rendered via thumb.php or thumb_handler.php
		'anon' => null,
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'renderfile-nonstandard' => array( // same as above but for non-standard thumbnails
		'anon' => null,
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'stashedit' => array( // stashing edits into cache before save
		'anon' => null,
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'changetag' => array( // adding or removing change tags
		'user' => null,
		'newbie' => null,
	),
);
MediaWiki version:
1.24
$wgRateLimits = array(
	'edit' => array(
		'anon' => null, // for any and all anonymous edits (aggregate)
		'user' => null, // for each logged-in user
		'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
		'ip' => null, // for each anon and recent account
		'subnet' => null, // ... within a /24 subnet in IPv4 or /64 in IPv6
	),
	'upload' => array(
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'move' => array(
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'mailpassword' => array( // triggering password resets emails
		'anon' => null,
	),
	'emailuser' => array( // emailing other users using MediaWiki
		'user' => null,
	),
	'linkpurge' => array( // purges of link tables
		'anon' => null,
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'renderfile' => array( // files rendered via thumb.php or thumb_handler.php
		'anon' => null,
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'renderfile-nonstandard' => array( // same as above but for non-standard thumbnails
		'anon' => null,
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
);
MediaWiki version:
1.23
$wgRateLimits = array(
	'edit' => array(
		'anon' => null, // for any and all anonymous edits (aggregate)
		'user' => null, // for each logged-in user
		'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
		'ip' => null, // for each anon and recent account
		'subnet' => null, // ... within a /24 subnet in IPv4 or /64 in IPv6
	),
	'upload' => array(
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'move' => array(
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'mailpassword' => array( // triggering password resets emails
		'anon' => null,
	),
	'emailuser' => array( // emailing other users using MediaWiki
		'user' => null,
	),
	'linkpurge' => array( // purges of link tables
		'anon' => null,
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'renderfile' => array( // files rendered via thumb.php or thumb_handler.php
		'anon' => null,
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
);
MediaWiki version:
1.22
$wgRateLimits = array(
	'edit' => array(
		'anon' => null, // for any and all anonymous edits (aggregate)
		'user' => null, // for each logged-in user
		'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
		'ip' => null, // for each anon and recent account
		'subnet' => null, // ... within a /24 subnet in IPv4 or /64 in IPv6
	),
	'move' => array(
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'mailpassword' => array( // triggering password resets emails
		'anon' => null,
	),
	'emailuser' => array( // emailing other users using MediaWiki
		'user' => null,
	),
	'linkpurge' => array( // purges of link tables
		'anon' => null,
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'renderfile' => array( // files rendered via thumb.php or thumb_handler.php
		'anon' => null,
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
);
MediaWiki versions:
1.10 – 1.21
$wgRateLimits = array(
	'edit' => array(
		'anon' => null, // for any and all anonymous edits (aggregate)
		'user' => null, // for each logged-in user
		'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
		'ip' => null, // for each anon and recent account
		'subnet' => null, // ... with final octet removed
	),
	'move' => array(
		'user' => null,
		'newbie' => null,
		'ip' => null,
		'subnet' => null,
	),
	'mailpassword' => array(
		'anon' => null,
	),
	'emailuser' => array(
		'user' => null,
	),
);
MediaWiki versions:
1.7 – 1.9
$wgRateLimits = array(
	'edit' => array(
		'anon'   => null, // for any and all anonymous edits (aggregate)
		'user'   => null, // for each logged-in user
		'newbie' => null, // for each recent account; overrides 'user'
		'ip'     => null, // for each anon and recent account
		'subnet' => null, // ... with final octet removed
		),
	'move' => array(
		'user'   => null,
		'newbie' => null,
		'ip'     => null,
		'subnet' => null,
		),
	'mailpassword' => array(
		'anon' => NULL,
		),
	);
MediaWiki versions:
1.4 – 1.6
$wgRateLimits = array(
	'edit' => array(
		'anon'   => null, // for any and all anonymous edits (aggregate)
		'user'   => null, // for each logged-in user
		'newbie' => null, // for each recent account; overrides 'user'
		'ip'     => null, // for each anon and recent account
		'subnet' => null, // ... with final octet removed
		),
	'move' => array(
		'user'   => null,
		'newbie' => null,
		'ip'     => null,
		'subnet' => null,
		),
	);

Version differences

[edit]
  • The 'mailpassword' array was added in MediaWiki 1.7.0.
  • The 'emailuser' array was added in MediaWiki 1.10.0.
  • The 'linkpurge' array was added in MediaWiki 1.22.0.
  • The 'renderfile' array was added in MediaWiki 1.22.0.

See also

[edit]