{"record":{"id":"f0032f6d23df4954","repo":"nextcloud/server","slug":"this-version-of-the-client-is-unsupported-upgrade","errorCode":null,"errorMessage":"This version of the client is unsupported. Upgrade to <a href=\"$customClientDesktopLink\">version $minimumSupportedDesktopVersion or later</a>.","messagePattern":"This version of the client is unsupported\\. Upgrade to <a href=\"\\$customClientDesktopLink\">version \\$minimumSupportedDesktopVersion or later</a>\\.","errorType":"http","errorClass":"Sabre\\DAV\\Exception\\Forbidden","httpStatus":403,"severity":"error","filePath":"apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php","lineNumber":65,"sourceCode":"\t */\n\tpublic function beforeHandler(RequestInterface $request) {\n\t\t$userAgent = $request->getHeader('User-Agent');\n\t\tif ($userAgent === null) {\n\t\t\treturn;\n\t\t}\n\n\t\t$minimumSupportedDesktopVersion = $this->config->getSystemValueString('minimum.supported.desktop.version', '3.3.50');\n\t\t$maximumSupportedDesktopVersion = $this->config->getSystemValueString('maximum.supported.desktop.version', '99.99.99');\n\n\t\t// Check if the client is a desktop client\n\t\tpreg_match(IRequest::USER_AGENT_CLIENT_DESKTOP, $userAgent, $versionMatches);\n\n\t\t// If the client is a desktop client and the version is too old, block it\n\t\tif (isset($versionMatches[1]) && version_compare($versionMatches[1], $minimumSupportedDesktopVersion) === -1) {\n\t\t\t$customClientDesktopLink = htmlspecialchars($this->themingDefaults->getSyncClientUrl());\n\t\t\t$minimumSupportedDesktopVersion = htmlspecialchars($minimumSupportedDesktopVersion);\n\n\t\t\tthrow new \\Sabre\\DAV\\Exception\\Forbidden(\"This version of the client is unsupported. Upgrade to <a href=\\\"$customClientDesktopLink\\\">version $minimumSupportedDesktopVersion or later</a>.\");\n\t\t}\n\n\t\t// If the client is a desktop client and the version is too new, block it\n\t\tif (isset($versionMatches[1]) && version_compare($versionMatches[1], $maximumSupportedDesktopVersion) === 1) {\n\t\t\t$customClientDesktopLink = htmlspecialchars($this->themingDefaults->getSyncClientUrl());\n\t\t\t$maximumSupportedDesktopVersion = htmlspecialchars($maximumSupportedDesktopVersion);\n\n\t\t\tthrow new \\Sabre\\DAV\\Exception\\Forbidden(\"This version of the client is unsupported. Downgrade to <a href=\\\"$customClientDesktopLink\\\">version $maximumSupportedDesktopVersion or earlier</a>.\");\n\t\t}\n\t}\n}\n","sourceCodeStart":47,"sourceCodeEnd":77,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php#L47-L77","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Upgrade the desktop client to the linked version or later (primary fix)","Fleet-wide: distribute the current client via MDM/software deployment before upgrading the server","Temporary mitigation: lower the floor in config.php ('minimum.supported.desktop.version' => '3.1.0') — remove it once clients are updated","If the maximum check is the trigger instead, align maximum.supported.desktop.version with reality for pre-release clients"],"exampleFix":"// before: server blocks old clients with 403\n// minimum.supported.desktop.version defaults to 3.3.50\n\n// after (config/php/config.php, temporary bridge during fleet upgrade)\n'minimum.supported.desktop.version' => '3.1.0',","handlingStrategy":"validation","validationCode":"// client-side gate before talking to a (possibly upgraded) server\nconst MIN_SUPPORTED = '3.3.50'; // mirror minimum.supported.desktop.version\nif (versionCompare(CLIENT_VERSION, MIN_SUPPORTED) < 0) {\n    notifyUser('Client too old for this server — upgrade required before syncing.');\n    disableSync();\n}","typeGuard":null,"tryCatchPattern":"try {\n    await davClient.propfind('/');\n} catch (e) {\n    if (e.status === 403 && /version of the client is unsupported/i.test(e.body ?? '')) {\n        // hard block from BlockLegacyClientPlugin: upgrade the client; do not retry\n        hardStopSyncAndShowUpgradeLink(e.body);\n    } else {\n        throw e;\n    }\n}","preventionTips":["Upgrade the desktop client fleet before upgrading the Nextcloud server","Track minimum/maximum.supported.desktop.version in config when managing mixed-version fleets","Treat the 403 with the upgrade anchor as terminal — retries cannot succeed","Avoid desktop-client User-Agent strings in custom tools unless you also carry a valid version"],"tags":["dav","client-compatibility","user-agent","http-403","config"],"backgroundTag":"client-version-unsupported","analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}