From: csteipp Date: Tue, 9 Feb 2016 01:44:06 +0000 (-0800) Subject: Limit ip-all/subnet-all ping limts per wiki X-Git-Tag: 1.31.0-rc.0~8016^2~1 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/wiki/supprimer.php?a=commitdiff_plain;h=461406e31864e75fcd1c2f5ac967cb7ba5e5a182;p=lhc%2Fweb%2Fwiklou.git Limit ip-all/subnet-all ping limts per wiki 47973faa7c7d4832 used a static string for ip-all/subnet-all limits, instead of generating a key unique to each wiki. Change-Id: Ie8013dc959fdeba92ecd463550e3d98d83276004 --- diff --git a/includes/user/User.php b/includes/user/User.php index da6307551c..6638fb7ded 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -1789,14 +1789,14 @@ class User implements IDBAccessObject { // ip-based limits if ( isset( $limits['ip'] ) ) { $ip = $this->getRequest()->getIP(); - $keys["mediawiki:limiter:$action:ip:$ip"] = $limits['ip']; + $keys[wfMemcKey( 'limiter', $action, 'ip', $ip )] = $limits['ip']; } // subnet-based limits if ( isset( $limits['subnet'] ) ) { $ip = $this->getRequest()->getIP(); $subnet = IP::getSubnet( $ip ); if ( $subnet !== false ) { - $keys["mediawiki:limiter:$action:subnet:$subnet"] = $limits['subnet']; + $keys[wfMemcKey( 'limiter', $action, 'subnet', $subnet )] = $limits['subnet']; } } }