aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Http/Client/DnsPinMiddleware.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: Add SPDX headerAndy Scherzinger2024-05-241-19/+2
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix(dns): detect disabled IPv6 support in DNS pinningBenjamin Gaussorgues2024-03-261-1/+3
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Include `hostName:$port` for Host access violation message as wellRobin Kluth2024-02-241-1/+1
| | | Signed-off-by: Robin Kluth <Commifreak@users.noreply.github.com>
* Log Host/IP in `LocalServerException` for `Host violates local access rules`Robin Kluth2024-02-241-1/+1
| | | Signed-off-by: Robin Kluth <Commifreak@users.noreply.github.com>
* test: add tests for dns pin middlewareDaniel Kesselberg2023-09-121-2/+9
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* enh: skip processing for empty responseDaniel Kesselberg2023-09-041-0/+4
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Fix DNS Pin Middleware throwing for public IPsChristoph Wurst2022-11-081-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add remote host validation APIChristoph Wurst2022-10-311-5/+9
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Rename LocalAddressChecker methods to lower caseChristoph Wurst2022-10-271-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add missing urldecode and idn_to_utf8 calls to local address checkerCôme Chilliet2022-09-201-1/+1
| | | | | | The call to idn_to_utf8 call is actually to apply normalization Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Check for !== false instead Lukas Reschke2021-07-121-1/+1
| | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Check if dns_get_record returns non-falseLukas Reschke2021-07-121-1/+1
| | | | | | | `dns_get_record` can return false which results in exceptions such as the ones shown in https://github.com/nextcloud/server/issues/27870. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Fixes recursion count incrementationSanpi2021-07-071-1/+1
| | | | Signed-off-by: Sanpi <sanpi@homecomputing.fr>
* Merge pull request #27801 from nextcloud/enh/noid/hardening-dns-pin-middlewarekesselb2021-07-061-13/+28
|\ | | | | Ignore subdomain for soa queries
| * Ignore subdomain for soa queriesDaniel Kesselberg2021-07-051-13/+28
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Fix DnsPinMiddleware resolve pinning bugAaron Ball2021-07-021-5/+12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | Libcurl expects the value of the CURLOPT_RESOLVE configurations to be an array of strings, those strings containing a comma delimited list of resolved IPs for each host:port combination. The original code here does create that array with the host:port:ip combination, but multiple ips for a single host:port result in additional array entries, rather than adding them to the end of the string with a comma. Per the libcurl docs, the `CURLOPT_RESOLVE` array entries should match the syntax `host:port:address[,address]`. This creates a function-scoped associative array which uses `host:port` as the key (which are supposed to be unique and this ensures that), and the value is an array containing IP strings (ipv4 or ipv6). Once the associative array is populated, it is then set to the CURLOPT_RESOLVE array, imploding the ip arrays using a comma delimiter so the array syntax matches the expected by libcurl. Note that this reorders the "foreach ip" and "foreach port" loops. Rather than looping over ips then ports, we now loop over ports then ips, since ports are part of the unique host:port map, and multiple ips can exist therein. Signed-off-by: Aaron Ball <nullspoon@oper.io>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Strictify null checkLukas Reschke2021-04-061-2/+3
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Improve networking checksLukas Reschke2021-04-061-0/+128
Whilst we currently state that SSRF is generally outside of our threat model, this is something where we should invest to improve this. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>