Skip to content

[stable7] Suspicious encryption warnings when moving folder to share mount point #11162

Closed

Description

@PVince81

Steps to reproduce

  1. Enable encryption
  2. Create two users "root" and "user1"
  3. Login as both to enable their keys
  4. As "user1" create a folder "sh"
  5. Share "sh" with "root"
  6. Login as "root" and create a folder "sub"
  7. Create a file "test.txt" with contents inside of "sub"
  8. 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

  1. PVince81 commented on Sep 18, 2014

    @PVince81
    ContributorAuthor

    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"

  2. PVince81 commented on Sep 18, 2014

    @PVince81
    ContributorAuthor

    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.

  3. added this to the milestone on Sep 18, 2014
  4. self-assigned this
    on Sep 18, 2014
  5. PVince81 commented on Sep 18, 2014

    @PVince81
    ContributorAuthor

    Fix is here #11167

  6. locked as resolved and limited conversation to collaborators on Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions