If you are running multiple wikis, you probably want the rate limit
on one wiki to apply to all wikis
Bug: T126685
Change-Id: Id662742c7af1b26811f5b0aa199176cb9a7658d9
"allowed account creation w/o throttle\n" );
} else {
if ( ( $wgAccountCreationThrottle && $currentUser->isPingLimitable() ) ) {
"allowed account creation w/o throttle\n" );
} else {
if ( ( $wgAccountCreationThrottle && $currentUser->isPingLimitable() ) ) {
- $key = wfMemcKey( 'acctcreate', 'ip', $ip );
+ $key = wfGlobalCacheKey( 'acctcreate', 'ip', $ip );
$value = $cache->get( $key );
if ( !$value ) {
$cache->set( $key, 0, $cache::TTL_DAY );
$value = $cache->get( $key );
if ( !$value ) {
$cache->set( $key, 0, $cache::TTL_DAY );
$throttleCount = 0;
if ( is_array( $wgPasswordAttemptThrottle ) ) {
$throttleCount = 0;
if ( is_array( $wgPasswordAttemptThrottle ) ) {
- $throttleKey = wfMemcKey( 'password-throttle', $wgRequest->getIP(), md5( $username ) );
+ $throttleKey = wfGlobalCacheKey( 'password-throttle', $wgRequest->getIP(), md5( $username ) );
$count = $wgPasswordAttemptThrottle['count'];
$period = $wgPasswordAttemptThrottle['seconds'];
$count = $wgPasswordAttemptThrottle['count'];
$period = $wgPasswordAttemptThrottle['seconds'];
global $wgRequest;
$username = trim( $username ); // sanity
global $wgRequest;
$username = trim( $username ); // sanity
- $throttleKey = wfMemcKey( 'password-throttle', $wgRequest->getIP(), md5( $username ) );
+ $throttleKey = wfGlobalCacheKey( 'password-throttle', $wgRequest->getIP(), md5( $username ) );
ObjectCache::getLocalClusterInstance()->delete( $throttleKey );
}
ObjectCache::getLocalClusterInstance()->delete( $throttleKey );
}
// Reset the throttle
$request = $this->getRequest();
// Reset the throttle
$request = $this->getRequest();
- $key = wfMemcKey( 'password-throttle', $request->getIP(), md5( $this->mUsername ) );
+ $key = wfGlobalCacheKey( 'password-throttle', $request->getIP(), md5( $this->mUsername ) );
$cache->delete( $key );
if ( $this->hasSessionCookie() || $this->mSkipCookieCheck ) {
$cache->delete( $key );
if ( $this->hasSessionCookie() || $this->mSkipCookieCheck ) {