Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -311,14 +311,15 @@ |
312 | 312 | |
313 | 313 | if ( $wgAccountCreationThrottle && $wgUser->isPingLimitable() ) { |
314 | 314 | $key = wfMemcKey( 'acctcreate', 'ip', $ip ); |
315 | | - $value = $wgMemc->incr( $key ); |
| 315 | + $value = $wgMemc->get( $key ); |
316 | 316 | if ( !$value ) { |
317 | | - $wgMemc->set( $key, 1, 86400 ); |
| 317 | + $wgMemc->set( $key, 0, 86400 ); |
318 | 318 | } |
319 | | - if ( $value > $wgAccountCreationThrottle ) { |
| 319 | + if ( $value >= $wgAccountCreationThrottle ) { |
320 | 320 | $this->throttleHit( $wgAccountCreationThrottle ); |
321 | 321 | return false; |
322 | 322 | } |
| 323 | + $wgMemc->incr( $key ); |
323 | 324 | } |
324 | 325 | |
325 | 326 | if( !$wgAuth->addUser( $u, $this->mPassword, $this->mEmail, $this->mRealName ) ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -377,6 +377,12 @@ |
378 | 378 | now automatically removed from titles; these characters can accidentally end |
379 | 379 | up in copy-and-pasted titles, and, by overriding normal bidirectional text |
380 | 380 | handling, can lead to annoying behavior such as text rendering backwards |
| 381 | +* Fixed minor bug where the memcached value for how many accounts an IP had |
| 382 | + created that day would be increased even if $wgAccountCreationThrottle was |
| 383 | + hit. This meant if an IP hit the throttle and then the throttle was raised |
| 384 | + later that day, the IP still couldn't create another account, because it |
| 385 | + had marked them as having created another account, when their last account |
| 386 | + creation had actually failed. |
381 | 387 | |
382 | 388 | === API changes in 1.14 === |
383 | 389 | |