aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Security/Normalizer
Commit message (Collapse)AuthorAgeFilesLines
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-151-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Add SPDX headerAndy Scherzinger2024-05-131-17/+2
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Improve normalizer detecting IPv4 inside of IPv6Vincent Petry2021-11-221-1/+9
| | | | | | | The subnet for an IPv4 address inside of IPv6 is now returned in its IPv4 form. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Fix getting subnet of ipv4 mapped ipv6 addressesVincent Petry2021-11-221-0/+4
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Make Security module strictJ0WI2021-04-191-0/+3
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Increase subnet matcherLukas Reschke2021-04-071-2/+10
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+0
| | | | | | | | | | | | | | | 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>
* Allow bracket IPv6 address format inside IPAdress NormalizerThomas Citharel2019-01-031-0/+4
| | | | | | When run with php's build-in server (for instance on localhost:8080), IP provided through $this->server['REMOTE_ADDR'] is [::1], which is not an acceptable format for \inet_pton. This removes the brackets if there's any. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Add support for ratelimiting via annotationsLukas Reschke2017-04-131-0/+59
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>