Remove JavaScript global variable wgLoadScript
[lhc/web/wiklou.git] / includes / auth / Throttler.php
index 3125bd3..e6d9bd8 100644 (file)
@@ -52,7 +52,7 @@ class Throttler implements LoggerAwareInterface {
        protected $warningLimit;
 
        /**
-        * @param array $conditions An array of arrays describing throttling conditions.
+        * @param array|null $conditions An array of arrays describing throttling conditions.
         *     Defaults to $wgPasswordAttemptThrottle. See documentation of that variable for format.
         * @param array $params Parameters (all optional):
         *   - type: throttle type, used as a namespace for counters,
@@ -138,7 +138,7 @@ class Throttler implements LoggerAwareInterface {
                                $this->logRejection( [
                                        'throttle' => $this->type,
                                        'index' => $index,
-                                       'ip' => $ipKey,
+                                       'ipKey' => $ipKey,
                                        'username' => $username,
                                        'count' => $count,
                                        'expiry' => $expiry,
@@ -193,7 +193,7 @@ class Throttler implements LoggerAwareInterface {
 
        protected function logRejection( array $context ) {
                $logMsg = 'Throttle {throttle} hit, throttled for {expiry} seconds due to {count} attempts '
-                       . 'from username {username} and IP {ip}';
+                       . 'from username {username} and IP {ipKey}';
 
                // If we are hitting a throttle for >= warningLimit attempts, it is much more likely to be
                // an attack than someone simply forgetting their password, so log it at a higher level.