core icon indicating copy to clipboard operation
core copied to clipboard

File without extension is created when trying to move a shared folder inside another shared folder

Open purigarcia opened this issue 13 years ago • 5 comments

Expected behaviour

Folder "AA1" is inside folder "BB".

Actual behaviour

There is a file called "AA1" without extension instead of a folder called "AA1" and it's possible to see it in the server logged as user1 or user2

Steps to reproduce

  1. There are two users in the server (user1 and user2)

  2. In the server, log in owncloud as user 1

  3. Share a folder called "AA" and a folder called "BB" with user2.

  4. Inside folder "AA", there is a folder called "AA1" with files inside it.

  5. Give user2 all the permission (create, update, delete) in both folders

  6. Now using webdav protocol, try to move the folder "AA1" from "AA" to "BB". Notice that all the folders involve are shared folders. Also notice that you have the correct permission to do the action. We are going to see do it using poster (complement in firefox)

       - URL:server/remote.php/webdav/Shared/AA/AA1
       - User: user2 
       - password:
       - Action: MOVE
       - Headers
               * Destination: server/remote.php/webdav/BB/AA1
               * Overwrite T
    

    screen shot 2013-10-10 at 11 06 36 am 2

  7. The action is done

  8. In the server, logged as user1 or user2, access to folder "BB" an there is a file without extension called "AA1"

Server configuration

Operating system: openSUSE

Database: SQLite 3

ownCloud version: {"installed":"true","version":"5.80.8.1","versionstring":"6.0 pre alpha","edition":""}

Client configuration

Browser: Chrome

Operating system: MaOs 10.7.5

purigarcia avatar Oct 10 '13 09:10 purigarcia

@purigarcia @rperezb can I ask you to retest this with the latest git master? THX

DeepDiver1975 avatar Oct 16 '13 19:10 DeepDiver1975

tested with {"installed":"true","version":"5.0.0.1","versionstring":"6.0 alpha 2","edition":""} Same behavior, a file without extension is created instead of the folder

rperezb avatar Oct 17 '13 10:10 rperezb

The implementation Shared_Storage::rename() and Shared_Storage::copy() are only handling files as source but not folders. see https://github.com/owncloud/core/blob/master/apps/files_sharing/lib/sharedstorage.php#L294

@icewind1991 Can I ask you to have a look at this? THX

DeepDiver1975 avatar Nov 11 '13 13:11 DeepDiver1975

@karlitschek as we can loose data due to this bug I consider this critical -> Panic label attached

DeepDiver1975 avatar Nov 11 '13 13:11 DeepDiver1975

Checked https://github.com/owncloud/core/pull/5805 and it works

rperezb avatar Nov 13 '13 17:11 rperezb