Use the unjailed-path in OC_Helper::getStorageInfo() for files located in SharedStorage.#30985
Conversation
…d in SharedStorage. The current implementation already switches the storage-backend to $storage->getSourceStorage(). However, it then calls $rootInfo->getInternalPath() which returns the internal path relative to the storage where the share is mounted. This is wrong, we need also to unjail the path. Compare, e.g., with OCA\Files_Sharing\SharedStorage::file_get/put_contents() for the "logic". Signed-off-by: Claus-Justus Heine <himself@claus-justus-heine.de>
|
Do you know a test case there this previously broke and now is fixed? |
When listing any shared folder deeper than 1 level I have error messages in my logs like That they do not show up more often is probably caused by the following fall-back to the server/lib/private/Files/Storage/Local.php Lines 377 to 380 in eb19270 which means that just listing a shared folder will not trigger the error messages, but give wrong results. |
|
|
|
/backport to stable23 |
This comment was marked as resolved.
This comment was marked as resolved.
|
/backport to stable22 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
Me too, I also experience the same issue with nextcloud 23.0.2. I added the patch manually. I will report if it worked. @update: It worked. The errors disappeared. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
How to apply this hot fix? |
|
@syuo7 At the top of this page, there is tab "Commits". If you click it, you will see which file is changed and how it is changed. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
Yes, the issue will be fixed with 23.0.3 and 22.2.6 |
The current implementation already switches the storage-backend to
$storage->getSourceStorage(). However, it then calls$rootInfo->getInternalPath()which returns the internal path relative to the storage where the share is mounted. This is wrong, we need also to unjail the path. Compare, e.g., withOCA\Files_Sharing\SharedStorage::file_get/put_contents()for the"logic".
Fix #30992
Signed-off-by: Claus-Justus Heine himself@claus-justus-heine.de