nextcloud/server · error · Sabre\DAV\Exception\Forbidden

This version of the client is unsupported. Upgrade to <a hre

Error message

This version of the client is unsupported. Upgrade to <a href="$customClientDesktopLink">version $minimumSupportedDesktopVersion or later</a>.

What it means

Raised by BlockLegacyClientPlugin before the request is served: the User-Agent matched the Nextcloud desktop client pattern (IRequest::USER_AGENT_CLIENT_DESKTOP) and its captured version compares below minimum.supported.desktop.version (default '3.3.50'). The server answers 403 Forbidden with an HTML upgrade link built from the theming sync client URL. A mirrored check against maximum.supported.desktop.version (default '99.99.99') blocks too-new/unknown builds with a downgrade message.

Source

Thrown at apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php:65

	 */
	public function beforeHandler(RequestInterface $request) {
		$userAgent = $request->getHeader('User-Agent');
		if ($userAgent === null) {
			return;
		}

		$minimumSupportedDesktopVersion = $this->config->getSystemValueString('minimum.supported.desktop.version', '3.3.50');
		$maximumSupportedDesktopVersion = $this->config->getSystemValueString('maximum.supported.desktop.version', '99.99.99');

		// Check if the client is a desktop client
		preg_match(IRequest::USER_AGENT_CLIENT_DESKTOP, $userAgent, $versionMatches);

		// If the client is a desktop client and the version is too old, block it
		if (isset($versionMatches[1]) && version_compare($versionMatches[1], $minimumSupportedDesktopVersion) === -1) {
			$customClientDesktopLink = htmlspecialchars($this->themingDefaults->getSyncClientUrl());
			$minimumSupportedDesktopVersion = htmlspecialchars($minimumSupportedDesktopVersion);

			throw new \Sabre\DAV\Exception\Forbidden("This version of the client is unsupported. Upgrade to <a href=\"$customClientDesktopLink\">version $minimumSupportedDesktopVersion or later</a>.");
		}

		// If the client is a desktop client and the version is too new, block it
		if (isset($versionMatches[1]) && version_compare($versionMatches[1], $maximumSupportedDesktopVersion) === 1) {
			$customClientDesktopLink = htmlspecialchars($this->themingDefaults->getSyncClientUrl());
			$maximumSupportedDesktopVersion = htmlspecialchars($maximumSupportedDesktopVersion);

			throw new \Sabre\DAV\Exception\Forbidden("This version of the client is unsupported. Downgrade to <a href=\"$customClientDesktopLink\">version $maximumSupportedDesktopVersion or earlier</a>.");
		}
	}
}

View on GitHub (pinned to ecdeb153ff)

Solutions

  1. Upgrade the desktop client to the linked version or later (primary fix)
  2. Fleet-wide: distribute the current client via MDM/software deployment before upgrading the server
  3. Temporary mitigation: lower the floor in config.php ('minimum.supported.desktop.version' => '3.1.0') — remove it once clients are updated
  4. If the maximum check is the trigger instead, align maximum.supported.desktop.version with reality for pre-release clients

Example fix

// before: server blocks old clients with 403
// minimum.supported.desktop.version defaults to 3.3.50

// after (config/php/config.php, temporary bridge during fleet upgrade)
'minimum.supported.desktop.version' => '3.1.0',
Defensive patterns

Strategy: validation

Validate before calling

// client-side gate before talking to a (possibly upgraded) server
const MIN_SUPPORTED = '3.3.50'; // mirror minimum.supported.desktop.version
if (versionCompare(CLIENT_VERSION, MIN_SUPPORTED) < 0) {
    notifyUser('Client too old for this server — upgrade required before syncing.');
    disableSync();
}

Try / catch

try {
    await davClient.propfind('/');
} catch (e) {
    if (e.status === 403 && /version of the client is unsupported/i.test(e.body ?? '')) {
        // hard block from BlockLegacyClientPlugin: upgrade the client; do not retry
        hardStopSyncAndShowUpgradeLink(e.body);
    } else {
        throw e;
    }
}

Prevention

When it happens

Trigger: A desktop sync client older than 3.3.50 (or the configured floor) connects to remote.php/dav after a server upgrade; the admin lowered/raised minimum.supported.desktop.version in config.php; a custom client mimicking the desktop UA string with a low version number.

Common situations: Stale installers or long-undeployed machines after the server was updated; pinned old client versions in managed fleets; test harnesses using the desktop UA regex; also beta/dev builds exceeding the configured maximum.

Related errors


AI-assisted analysis of nextcloud/server@ecdeb153ff (2026-08-17). Data as JSON: /api/errors/f0032f6d23df4954. Report an issue: GitHub.