Repository navigation
Closed
Description
Steps to reproduce
- Enable encryption
- Create two users "root" and "user1"
- Login as both to enable their keys
- As "user1" create a folder "sh"
- Share "sh" with "root"
- Login as "root" and create a folder "sub"
- Create a file "test.txt" with contents inside of "sub"
- Drag and move "sub" onto "sh" to make it change owner
Expected result
Successful move, no warnings.
Actual result
Successful move, file can still be read apparently.
Suspicous warnings in log:
{"reqId":"541afc49dd060","app":"Encryption library","message":"can't get path and owner from the file before it was renamed","level":0,"time":"2014-09-18T15:37:46+00:00","method":"POST","url":"\/owncloud\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541afc49dd060","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files\/sh\/sub' !!! \ncache: Array\n(\n [fileid] => 19\n [storage] => home::user1\n [path] => files\/sh\/sub\n [parent] => 15\n [name] => sub\n [mimetype] => httpd\/unix-directory\n [mimepart] => httpd\n [size] => 0\n [mtime] => 1411054665\n [storage_mtime] => 1411054665\n [encrypted] => \n [unencrypted_size] => 0\n [etag] => 541afc49da31d\n [permissions] => 31\n)\n \ndata: Array\n(\n [mimetype] => httpd\/unix-directory\n [mtime] => 1411054666\n [size] => -1\n [etag] => 541afc4a8cf45\n [storage_mtime] => 1411054666\n [permissions] => 31\n [parent] => 15\n)\n","level":0,"time":"2014-09-18T15:37:46+00:00","method":"POST","url":"\/owncloud\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541afc49dd060","app":"Encryption library","message":"can't get path and owner from the file before it was renamed","level":0,"time":"2014-09-18T15:37:46+00:00","method":"POST","url":"\/owncloud\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"541afc49dd060","app":"Encryption library","message":"can't get path and owner from the file before it was renamed","level":0,"time":"2014-09-18T15:37:46+00:00","method":"POST","url":"\/owncloud\/index.php\/apps\/files\/ajax\/move.php"}
Versions
ownCloud 7 (stable7 35cb14c)
This seems to be the expected code path but it possibly throws useless warnings.
The array $renamedFiles is empty. I guess there is probably another code path for when moving to mount point.
@schiesbn
Activity
PVince81 commentedon Sep 18, 2014
Also I noticed that the keys are not deleted from the original folder: "root" still has share keys inside of "root/files_encryption/share-keys/sub"
PVince81 commentedon Sep 18, 2014
I tried again and now if you have more than one file, only the first one's key will be generated.
It seems that the file proxy gets disabled too early and the encryption stream wrapper doesn't enable itself with subsequent files.
@MTRichards @craigpg Raising severity to critical: this leads to loss of data because share keys are getting lost.
PVince81 commentedon Sep 18, 2014
Fix is here #11167