diff options
author | Joas Schilling <coding@schilljs.com> | 2023-05-11 09:23:50 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-05-15 16:25:39 +0200 |
commit | 1131e6fabdeb5d14b5afc263644fbe183eba7e33 (patch) | |
tree | f7e1e6a51a7e974ddb9e107c4044cdc297258e2b /tests | |
parent | dee180409b9b245ce9bdc78e1aacdfb85ae7055d (diff) | |
download | nextcloud-server-1131e6fabdeb5d14b5afc263644fbe183eba7e33.tar.gz nextcloud-server-1131e6fabdeb5d14b5afc263644fbe183eba7e33.zip |
fix(middleware): Also abort the request when reaching max delay in afterController
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php index 7dfcfe22261..7f51c3d3a2a 100644 --- a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php @@ -125,7 +125,7 @@ class BruteForceMiddlewareTest extends TestCase { ->willReturn('127.0.0.1'); $this->throttler ->expects($this->once()) - ->method('sleepDelay') + ->method('sleepDelayOrThrowOnMax') ->with('127.0.0.1', 'login'); $this->throttler ->expects($this->once()) @@ -157,7 +157,7 @@ class BruteForceMiddlewareTest extends TestCase { ->method('getRemoteAddress'); $this->throttler ->expects($this->never()) - ->method('sleepDelay'); + ->method('sleepDelayOrThrowOnMax'); $this->throttler ->expects($this->never()) ->method('registerAttempt'); @@ -181,7 +181,7 @@ class BruteForceMiddlewareTest extends TestCase { ->method('getRemoteAddress'); $this->throttler ->expects($this->never()) - ->method('sleepDelay'); + ->method('sleepDelayOrThrowOnMax'); /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); |