Skip to content

Commit

Permalink
Fix: default max supported desktop version
Browse files Browse the repository at this point in the history
  • Loading branch information
flooxo committed Oct 30, 2023
1 parent a053f07 commit 3910c7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ public function beforeHandler(RequestInterface $request) {
}

$minimumSupportedDesktopVersion = $this->config->getSystemValue('minimum.supported.desktop.version', '2.3.0');
$maximumSupportedDesktopVersion = $this->config->getSystemValue('maximum.supported.desktop.version', '3.10.1');
$maximumSupportedDesktopVersion = $this->config->getSystemValue('maximum.supported.desktop.version', '');
preg_match(IRequest::USER_AGENT_CLIENT_DESKTOP, $userAgent, $versionMatches);
if (isset($versionMatches[1]) &&
version_compare($versionMatches[1], $minimumSupportedDesktopVersion) === -1 ||
!empty($maximumSupportedDesktopVersion) &&
version_compare($versionMatches[1], $maximumSupportedDesktopVersion) === 1) {
throw new \Sabre\DAV\Exception\Forbidden('Unsupported client version.');
}
Expand Down
4 changes: 2 additions & 2 deletions config/config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -2006,9 +2006,9 @@
* client version at the time of release of this server version.
*
*
* Defaults to ``3.10.1``
* Defaults to empty
*/
'maximum.supported.desktop.version' => '3.10.1',
'maximum.supported.desktop.version' => '',

/**
* Option to allow local storage to contain symlinks.
Expand Down

0 comments on commit 3910c7d

Please sign in to comment.