summaryrefslogtreecommitdiffstats
path: root/lib/private/Security/Normalizer
Commit message (Collapse)AuthorAgeFilesLines
* Type hint in IpAddress Vincent Petry2021-11-221-3/+2
| | | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
* Improve normalizer detecting IPv4 inside of IPv6Vincent Petry2021-11-221-2/+42
| | | | | | | 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/+2
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Increase subnet matcherLukas Reschke2021-04-071-2/+2
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Remove unneeded casts that were found by PsalmMorris Jobke2021-01-111-2/+2
| | | | | | In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521) Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headers for 18Christoph Wurst2019-12-201-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* handle IPv6 addresses with an explict incoming interface at the end (e.g ↵Konrad Bucheli2019-12-101-0/+4
| | | | | | | fe80::ae2d:d1e7:fe1e:9a8d%enp2s0) Signed-off-by: Konrad Bucheli <konrad.bucheli@gmx.ch> Signed-off-by: Konrad Bucheli <kb@open.ch>
* Update license headersChristoph Wurst2019-12-051-1/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Allow bracket IPv6 address format inside IPAdress NormalizerThomas Citharel2019-01-031-0/+3
| | | | | | 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>
* Make IPAddress typed and strictRoeland Jago Douma2018-01-141-8/+8
| | | | | | | | * Added scalar typehints * Added return statements * Added strict declaration Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersMorris Jobke2017-11-061-0/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add support for ratelimiting via annotationsLukas Reschke2017-04-131-0/+106
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>