diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-29 22:12:18 +0100 |
---|---|---|
committer | Jan Dageförde <jan.dagefoerde@ercis.uni-muenster.de> | 2018-10-31 10:54:17 +0100 |
commit | 71d2d3ca00f62fc44d49ced5aa8ea5c0b350fc58 (patch) | |
tree | d22dc9785e088094fd9bc0776507aa7e258ae450 /lib/private | |
parent | 4b9998533c574c405d257d358e707c6f814a78d5 (diff) | |
download | nextcloud-server-71d2d3ca00f62fc44d49ced5aa8ea5c0b350fc58.tar.gz nextcloud-server-71d2d3ca00f62fc44d49ced5aa8ea5c0b350fc58.zip |
Reset bruteforce on token refresh OAuth
When using atoken obtained via OAuth the token expires. Resulting in
brute force attempts hitting the requesting IP.
This resets the brute force attempts for that UID on a valid refresh of
the token.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Server.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index 5962012604a..c9a2d1d0ae7 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -753,7 +753,7 @@ class Server extends ServerContainer implements IServerContainer { $this->registerService('TrustedDomainHelper', function ($c) { return new TrustedDomainHelper($this->getConfig()); }); - $this->registerService('Throttler', function (Server $c) { + $this->registerService(Throttler::class, function (Server $c) { return new Throttler( $c->getDatabaseConnection(), new TimeFactory(), @@ -761,6 +761,7 @@ class Server extends ServerContainer implements IServerContainer { $c->getConfig() ); }); + $this->registerAlias('Throttler', Throttler::class); $this->registerService('IntegrityCodeChecker', function (Server $c) { // IConfig and IAppManager requires a working database. This code // might however be called when ownCloud is not yet setup. |