Skip to content

Commit

Permalink
Update 403 error message.
Browse files Browse the repository at this point in the history
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

Signed-off-by: Camila <hello@camilasan.com>
  • Loading branch information
camilasan committed Feb 2, 2024
1 parent 63f327c commit 6e513f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function beforeHandler(RequestInterface $request) {
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.');
throw new \Sabre\DAV\Exception\Forbidden('This client is unsupported by the server: upgrade to the minimum required '.$minimumSupportedDesktopVersion.' version.');
}
}
}

0 comments on commit 6e513f7

Please sign in to comment.