From 461406e31864e75fcd1c2f5ac967cb7ba5e5a182 Mon Sep 17 00:00:00 2001 From: csteipp Date: Mon, 8 Feb 2016 17:44:06 -0800 Subject: [PATCH] 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 --- includes/user/User.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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']; } } } -- 2.20.1