throw new \Sabre\DAV\Exception\Forbidden("This version of the client is unsupported. Upgrade to <ahref=\"$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) {
throw new \Sabre\DAV\Exception\Forbidden("This version of the client is unsupported. Downgrade to <ahref=\"$customClientDesktopLink\">version $maximumSupportedDesktopVersion or earlier</a>.");
$this->expectExceptionMessage('This version of the client is unsupported. Upgrade to <ahref="https://nextcloud.com/install/#install-clients">version 1.7.0 or later</a>.');
->expects($this->exactly(2))
->method('getSystemValueString')
->willReturnCallback(function (string $key) {
if ($key === 'minimum.supported.desktop.version') {
$this->expectExceptionMessage('This version of the client is unsupported. Upgrade to <ahref="https://example.com"><script>alter("hacked");</script>">version 1.7.0 <script>alert("unsafe")</script> or later</a>.');
->expects($this->exactly(2))
->method('getSystemValueString')
->willReturnCallback(function (string $key) {
if ($key === 'minimum.supported.desktop.version') {
? 'This version of the client is unsupported. Upgrade to <ahref="https://example.com"><script>alter("hacked");</script>">version 1.7.0 <script>alert("unsafe")</script> or later</a>.'
: 'This version of the client is unsupported. Downgrade to <ahref="https://example.com"><script>alter("hacked");</script>">version 2.0.0 <script>alert("unsafe")</script> or earlier</a>.';