Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-10-30 00:12:18 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-11-02 12:54:50 +0300
commit6971ecef9d5223e9996c14abb93458c33daa5989 (patch)
tree70acb4974f7ef41ea53a43c069c16686381b4416 /lib
parent661062271f35a5cadca91e5a42885e726f104eef (diff)
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')
-rw-r--r--lib/private/Server.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 84af87f0d2f..f66f780ad52 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.