aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Security/RateLimiting/Backend
Commit message (Collapse)AuthorAgeFilesLines
* fix: Prevent breaking change in IQueryBuilderFerdinand Thiessen2024-10-171-2/+2
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: Adjust parameter type usage and add SQLite supportFerdinand Thiessen2024-10-171-2/+2
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-2/+2
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor: Replace __CLASS__ with ::class referencesrefactor/self-class-referenceChristoph Wurst2024-09-151-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Add SPDX headerAndy Scherzinger2024-05-243-65/+6
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Refactors lib/private/Security.Faraz Samapoor2023-06-263-61/+44
| | | | | | Mainly using PHP8's constructor property promotion. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* feat(security): Allow to opt-out of ratelimit protection, e.g. for testing on CIJoas Schilling2023-04-032-12/+29
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make the DB query simpler (as we just deleted all other entries)Joas Schilling2022-01-281-3/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Implement review feedbackLukas Reschke2021-09-131-3/+3
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Apply suggestions from code review Lukas Reschke2021-09-131-7/+5
| | | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch> Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
* Implement PR review feedbackLukas Reschke2021-09-072-6/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Adjust logic to store period instead of current timestampLukas Reschke2021-09-063-36/+27
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add database ratelimiting backendLukas Reschke2021-09-061-0/+136
| | | | | | | In case no distributed memory cache is specified this adds a database backend for ratelimit purposes. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-042-4/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-3/+3
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-052-2/+9
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make OC\Security\RateLimiting strictRoeland Jago Douma2018-01-142-17/+24
| | | | | | | | | * Add return types * Add scalar argument types * Made strict * Cleaned up phpstorm inspections Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Also replace all other occurencesMorris Jobke2017-12-181-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headersMorris Jobke2017-11-062-0/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove expired attemptsLukas Reschke2017-04-132-12/+32
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add support for ratelimiting via annotationsLukas Reschke2017-04-132-0/+150
This allows adding rate limiting via annotations to controllers, as one example: ``` @UserRateThrottle(limit=5, period=100) @AnonRateThrottle(limit=1, period=100) ``` Would mean that logged-in users can access the page 5 times within 100 seconds, and anonymous users 1 time within 100 seconds. If only an AnonRateThrottle is specified that one will also be applied to logged-in users. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>