Commit Graph

5 Commits (e4fa9967014e99a70fcf0f45e84b35f610cedeb6)

Author SHA1 Message Date
Daniel Kesselberg 4ce4d7b9b3
fix: add option to remove the webroot for setup checks and don't check trusted_domains.
1) The checks for well-known urls should always run against the root domain and therefore the option to remove the webroot.

2) For trusted domains, the available protocol is unknown, and thus some guesswork would be needed to make that work. I've decided for now to not consider them anymore to reduce false-positives.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-09-05 10:30:36 +07:00
MichaIng ea994fe8fb
fix(settings): make trailing slash for caldav/carddav redirects optional
#43939 moved the CalDAV/CardDAV redirect checks from the frontend to a new backend API.

Since the backend does not send an authentication header, checking for the expected response code 207 of the DAV endpoint does not work anymore, hence the URL of the last redirect is checked instead.

This URL is expected to contain a trailing slash, which was not required before, since the DAV endpoint works properly without it (when authenticated).

While a trailing slash in the redirect does no harm, it causes many setups to throw an admin panel warning, while in fact the redirects work properly. Furthermore, the proposed "/.well-known/carddav" => "/remote.php/dav/" redirect leads to double slashes, when doing a request to "/.well-known/carddav/", which seems more wrong then right.

This change makes the trailing slash optional, hence old and adjusted setups won't throw the warning anymore, and the DAV endpoint works well in both cases.

Signed-off-by: MichaIng <micha@dietpi.com>
2024-06-24 17:52:22 +07:00
Andy Scherzinger ec5b60af28
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-06-03 20:33:31 +07:00
Ferdinand Thiessen 58f57fd13f
fix(settings): Adjust order of parameters for `runRequest`
Fixing invalid request to host `HEAD`.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-03-08 11:21:51 +07:00
Côme Chilliet 1ea88a73f6 feat(settings): Migrate .well-known URL setup check to new API
Co-authored-by: Côme Chilliet <come.chilliet@nextcloud.com>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-03-07 14:06:08 +07:00