Commit Graph

9 Commits (b452dc0697b949cf78ff499749e48e21c4ddfec6)

Author SHA1 Message Date
Josh b452dc0697 fix(SetupChecks): Pass webfinger if a handler is there
Signed-off-by: Josh <josh.t.richards@gmail.com>
2025-01-26 13:03:05 +07:00
Ferdinand Thiessen 7fbd518452
feat: Make `CheckServerResponseTrait` public and provide as `OCP\SetupCheck\CheckServerResponseTrait`
This trait is used by other apps for creating setup checks,
so we should provide it instead apps using private API.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-16 14:58:21 +07:00
Ferdinand Thiessen be1cd7a308
refactor(settings): `CheckServerResponseTrait` always expect absolute path
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-13 13:09:40 +07:00
Ferdinand Thiessen 9e979d42b4
fix(setup-checks): Ensure URL with webroot works
We basically mock the way `URLGenerator::getAbsoluteURL` works,
so we must make sure that the URL might already contain the webroot.
Because `baseURL` and `cliURL` also contain the webroot we need to remove
the webroot from the URL first.

Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Daniel <mail@danielkesselberg.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-13 13:06:24 +07:00
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