⚠️ This issue respects the following points: ⚠️
Bug description
If storage (e.g. external) fails during operation, exception is captured but ignored. Server response still comes with status 207
|
try { |
|
$subScanner->scanFile(''); |
|
} catch (StorageNotAvailableException|StorageInvalidException) { |
|
continue; |
|
} catch (\Exception $e) { |
|
// sometimes when the storage is not available it can be any exception |
|
$this->logger->error('Exception while scanning storage "' . $subStorage->getId() . '"', [ |
|
'exception' => $e, |
|
'app' => 'core', |
|
]); |
|
continue; |
|
} |
Clients can't tell the difference between no children in folder and failed to reach children and might wrongly interpret the signal (e.g. a desktop client can read this as 'child deleted on server' and drop local files, then send signal to clean server folder on next sync
Steps to reproduce
Basic reproduction with hardcoded logic to throw an exception:
- Create and mount external storage inside a parent folder, confirm PROPFIND returns
207 with all children listed.
- Clear the file cache root entry for mount, to force inside
if (!$rootEntry) branch.
- Hardcode to throw
StorageNotAvailableException inside that branch for this mount.
- Confirm
PROPFIND returns 207, without failed mount listed.
Expected behavior
Request should either:
- return different status, e.g.
503 Service Unavailable
- pass attribute, to inform clients of incomplete response
Depending on client expectation/readyness for the breaking change, it can be opt-in for backported versions, and default with coming major releases
Nextcloud Server version
32
Operating system
None
PHP engine version
PHP 8.3
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
Bug description
If storage (e.g. external) fails during operation, exception is captured but ignored. Server response still comes with status 207
server/lib/private/Files/View.php
Lines 1589 to 1600 in cbbbe5a
Clients can't tell the difference between
no children in folderandfailed to reach childrenand might wrongly interpret the signal (e.g. a desktop client can read this as 'child deleted on server' and drop local files, then send signal to clean server folder on next syncSteps to reproduce
Basic reproduction with hardcoded logic to throw an exception:
207with all children listed.if (!$rootEntry)branch.StorageNotAvailableExceptioninside that branch for this mount.PROPFINDreturns207, without failed mount listed.Expected behavior
Request should either:
503 Service UnavailableDepending on client expectation/readyness for the breaking change, it can be opt-in for backported versions, and default with coming major releases
Nextcloud Server version
32
Operating system
None
PHP engine version
PHP 8.3
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
-List of activated Apps
Nextcloud Signing status
Nextcloud Logs
-Additional info