diff options
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php index b328165fdfa..7153e481eda 100644 --- a/lib/base.php +++ b/lib/base.php @@ -74,6 +74,7 @@ use OCP\ILogger; use OCP\IRequest; use OCP\IURLGenerator; use OCP\IUserSession; +use OCP\Security\Bruteforce\IThrottler; use OCP\Server; use OCP\Share; use OCP\User\Events\UserChangedEvent; @@ -871,7 +872,7 @@ class OC { // reset brute force delay for this IP address and username $uid = $userSession->getUser()->getUID(); $request = Server::get(IRequest::class); - $throttler = Server::get(\OC\Security\Bruteforce\Throttler::class); + $throttler = Server::get(IThrottler::class); $throttler->resetDelay($request->getRemoteAddress(), 'login', ['user' => $uid]); } @@ -1149,7 +1150,7 @@ class OC { && $userSession->loginWithCookie($_COOKIE['nc_username'], $_COOKIE['nc_token'], $_COOKIE['nc_session_id'])) { return true; } - if ($userSession->tryBasicAuthLogin($request, Server::get(\OC\Security\Bruteforce\Throttler::class))) { + if ($userSession->tryBasicAuthLogin($request, Server::get(IThrottler::class))) { return true; } return false; |