use MediaWiki\Auth\AuthManager;
use MediaWiki\Auth\AuthenticationResponse;
use MediaWiki\Auth\AuthenticationRequest;
+use Wikimedia\ScopedCallback;
/**
* String Some punctuation to prevent editing from broken text-mangling proxies.
* @return string
*/
public function __toString() {
- return $this->getName();
+ return (string)$this->getName();
}
/**
// Extensions
Hooks::run( 'GetBlockedStatus', [ &$this ] );
-
}
/**
* @return bool True if blacklisted.
*/
public function inDnsBlacklist( $ip, $bases ) {
-
$found = false;
- // @todo FIXME: IPv6 ??? (http://bugs.php.net/bug.php?id=33170)
+ // @todo FIXME: IPv6 ??? (https://bugs.php.net/bug.php?id=33170)
if ( IP::isIPv4( $ip ) ) {
// Reverse IP, bug 21255
$ipReversed = implode( '.', array_reverse( explode( '.', $ip ) ) );
return false;
}
+ $limits = array_merge(
+ [ '&can-bypass' => true ],
+ $wgRateLimits[$action]
+ );
+
// Some groups shouldn't trigger the ping limiter, ever
- if ( !$this->isPingLimitable() ) {
+ if ( $limits['&can-bypass'] && !$this->isPingLimitable() ) {
return false;
}
- $limits = $wgRateLimits[$action];
$keys = [];
$id = $this->getId();
$userLimit = false;