summaryrefslogtreecommitdiffstats
path: root/lib/private/User/Session.php
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-01-17 17:21:27 +0100
committerBjoern Schiessle <bjoern@schiessle.org>2017-01-18 15:25:16 +0100
commitcdf01feba78696aa74b7f57a43380757d67df4aa (patch)
treec2d8f65ed871dc5789b5fb4867d34b495381756f /lib/private/User/Session.php
parent0271ae3b46e3421871b8eecb4b453dd5793e5e30 (diff)
downloadnextcloud-server-cdf01feba78696aa74b7f57a43380757d67df4aa.tar.gz
nextcloud-server-cdf01feba78696aa74b7f57a43380757d67df4aa.zip
add action to existing brute force protection
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib/private/User/Session.php')
-rw-r--r--lib/private/User/Session.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index 1834bd025d1..9cc42e671a8 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -317,7 +317,7 @@ class Session implements IUserSession, Emitter {
$password,
IRequest $request,
OC\Security\Bruteforce\Throttler $throttler) {
- $currentDelay = $throttler->sleepDelay($request->getRemoteAddress());
+ $currentDelay = $throttler->sleepDelay($request->getRemoteAddress(), 'login');
$isTokenPassword = $this->isTokenPassword($password);
if (!$isTokenPassword && $this->isTokenAuthEnforced()) {
@@ -334,7 +334,7 @@ class Session implements IUserSession, Emitter {
$throttler->registerAttempt('login', $request->getRemoteAddress(), ['uid' => $user]);
if($currentDelay === 0) {
- $throttler->sleepDelay($request->getRemoteAddress());
+ $throttler->sleepDelay($request->getRemoteAddress(), 'login');
}
return false;
}
@@ -768,7 +768,7 @@ class Session implements IUserSession, Emitter {
try {
$this->tokenProvider->invalidateToken($this->session->getId());
} catch (SessionNotAvailableException $ex) {
-
+
}
}
$this->setUser(null);