- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.6k
[stable23] Use the unjailed-path in OC_Helper::getStorageInfo() for files located in SharedStorage. #30999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @PVince81 should this go in the hotfix release? Or only later? | 
| 
 later. | 
| @PVince81 seems like this solves this issue: nextcloud/desktop#4243 | 
| @szaimen maybe not: nextcloud/desktop#4243 (comment) | 
| /rebase | 
…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>
5fa9d9f    to
    539c993      
    Compare
  
    | ⚙️ failure unrelated | 
| @szaimen Error still pressent in NC 23.0.3 [PHP] Error: disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#381 GET /ocs/v2.php/cloud/users/details?offset=0&limit=25&search= | 
| hm... strange | 
| @szaimen Yes very strange happened again yesterday I'll attached the log. I don't want to create another ticket that's why I wrote it here. Unless you want me to. Nextcloud Logs{"reqId":"roG5QwjiRWsCdOiV5GXT","level":3,"time":"2022-04-07T21:01:54+00:00","remoteAddr":"140.0.18.107","user":"JOHN.","app":"PHP","method":"POST","url":"/login","message":"disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#381","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Edg/99.0.1150.55","version":"23.0.3.2","exception":{"Exception":"Error","Message":"disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#381","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Local.php","line":381,"function":"disk_free_space"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Quota.php","line":110,"function":"free_space","class":"OC\\Files\\Storage\\Local","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Quota.php","line":238,"function":"free_space","class":"OC\\Files\\Storage\\Wrapper\\Quota","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":356,"function":"touch","class":"OC\\Files\\Storage\\Wrapper\\Quota","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1171,"function":"touch","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":575,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/Folder.php","line":200,"function":"touch","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Util.php","line":481,"function":"newFile","class":"OC\\Files\\Node\\Folder","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Util.php","line":479,"function":"copyr","class":"OC_Util","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Util.php","line":479,"function":"copyr","class":"OC_Util","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Util.php","line":479,"function":"copyr","class":"OC_Util","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Util.php","line":447,"function":"copyr","class":"OC_Util","type":"::"},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":562,"function":"copySkeleton","class":"OC_Util","type":"::"},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":414,"function":"prepareUserLogin","class":"OC\\User\\Session","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/CompleteLoginCommand.php","line":44,"function":"completeLogin","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\\Authentication\\Login\\CompleteLoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/LoggedInCheckCommand.php","line":60,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\\Authentication\\Login\\LoggedInCheckCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/EmailLoginCommand.php","line":58,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\\Authentication\\Login\\EmailLoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/UidLoginCommand.php","line":54,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\\Authentication\\Login\\UidLoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/UserDisabledCheckCommand.php","line":58,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\\Authentication\\Login\\UserDisabledCheckCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/PreLoginHookCommand.php","line":53,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/Chain.php","line":108,"function":"process","class":"OC\\Authentication\\Login\\PreLoginHookCommand","type":"->"},{"file":"/var/www/nextcloud/core/Controller/LoginController.php","line":329,"function":"process","class":"OC\\Authentication\\Login\\Chain","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"tryLogin","class":"OC\\Core\\Controller\\LoginController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"625098dd01d64"} | 
| I just updated to 24.0 and noticed this error in the log, for the first time (but I hadn't looked at the logs for a couple of months..). | 
backport of #30985