mirror of
https://github.com/nextcloud/server.git
synced 2026-03-29 13:53:55 -04:00
Merge pull request #39117 from nextcloud/backport/37428/stable26
[stable26] Ignore and log non integer versions
This commit is contained in:
commit
981262c57b
1 changed files with 7 additions and 1 deletions
|
|
@ -721,7 +721,13 @@ class Storage {
|
|||
}
|
||||
|
||||
foreach ($versions as $key => $version) {
|
||||
if ($expiration->isExpired($version['version'], $quotaExceeded) && !isset($toDelete[$key])) {
|
||||
if (!is_numeric($version['version'])) {
|
||||
\OC::$server->get(LoggerInterface::class)->error(
|
||||
'Found a non-numeric timestamp version: '. json_encode($version),
|
||||
['app' => 'files_versions']);
|
||||
continue;
|
||||
}
|
||||
if ($expiration->isExpired((int)($version['version']), $quotaExceeded) && !isset($toDelete[$key])) {
|
||||
$size += $version['size'];
|
||||
$toDelete[$key] = $version['path'] . '.v' . $version['version'];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue