aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorCamila <hello@camilasan.com>2024-02-02 10:41:43 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2024-09-06 17:15:45 +0200
commit0a72756d96cb1d85b6c0fd26189c341b75ec4f0d (patch)
tree5f2c656ec38cf78c40a19ce63491b6cf993c9773 /apps/dav/lib
parenta05e5428c5dea6f1be4dbca8635b729d49c958a6 (diff)
downloadnextcloud-server-0a72756d96cb1d85b6c0fd26189c341b75ec4f0d.tar.gz
nextcloud-server-0a72756d96cb1d85b6c0fd26189c341b75ec4f0d.zip
fix(dav): Update 403 error message
* The user should get a more friendly warning when their desktop client version is not supported anymore by the server. See #nextcloud/desktop/issues/6273 * Update BlockLegacyClientPluginTest to reflect the new 403 error message. Signed-off-by: Camila Ayres <hello@camilasan.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php b/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php
index c4e579bef0b..e59e3329cec 100644
--- a/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php
@@ -51,7 +51,8 @@ class BlockLegacyClientPlugin extends ServerPlugin {
preg_match(IRequest::USER_AGENT_CLIENT_DESKTOP, $userAgent, $versionMatches);
if (isset($versionMatches[1]) &&
version_compare($versionMatches[1], $minimumSupportedDesktopVersion) === -1) {
- throw new \Sabre\DAV\Exception\Forbidden('Unsupported client version.');
+ $customClientDesktopLink = $this->config->getSystemValue('customclient_desktop', 'https://nextcloud.com/install/#install-clients');
+ throw new \Sabre\DAV\Exception\Forbidden('This version of the client is unsupported. Upgrade to <a href="'.$customClientDesktopLink.'">version '.$minimumSupportedDesktopVersion.' or later</a>.');
}
}
}