diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-29 22:12:18 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-30 11:21:27 +0100 |
commit | 75456b057d58f321b6b46bd4f5899aba8e13fb02 (patch) | |
tree | e81ceaf1073643507b8cf8a96cf2e3fd8915bdc5 /lib/private | |
parent | 963d968f062810e846f000f02f1be3f560c286f9 (diff) | |
download | nextcloud-server-75456b057d58f321b6b46bd4f5899aba8e13fb02.tar.gz nextcloud-server-75456b057d58f321b6b46bd4f5899aba8e13fb02.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 32d7705919c..b40fd9f72bd 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -758,7 +758,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(), @@ -766,6 +766,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. |