NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
renaming file with blank filename deletes dir using webDAV?


Joined: 06 Apr 2004
Posts: 1
Reply with quote
I am currently evaluating PhpED (version 3.3 build 3332eval) using it to connect to a DAV account.

The DAV server is Solaris 9 running Apache 2.0.49 with DAV.

I was renaming a file and inadvertantly hit enter after deleting all text in the filename box.

A Error window came up saying "HTTP/1.1 500 Internal Server Error" followed by an Error window with "HTTP/1.1 404 Not Found"

At this point the directory ("test") containing the file ("test1234") was gone along with all the rest of files in that directory on the server.

The access log showed a MOVE operation folowed by a PROPFIND.
xx.xx.xx.xx - user [06/Apr/2004:12:53:00 -0500] "MOVE /test/test123 HTTP/1.1" 500 660
xx.xx.xx.xx - user[06/Apr/2004:12:53:43 -0500] "PROPFIND /test/ HTTP/1.1" 404 325

The eror log had these entries:
[Tue Apr 06 12:53:00 2004] [error] [client xx.xx.xx.xx] Could not MOVE/COPY /test/test1234. [500, #0]
[Tue Apr 06 12:53:00 2004] [error] [client xx.xx.xx.xx] (2)No such file or directory: Could not rename resource. [500, #0]

I am guessing that PhpED sent a MOVE command to move "test/tes1234" to "test/" which caused the test directory to be deleted.

I have reproduced this behavior several times. Use extreme caution if you attempt to reproduce!!!

I tried to reproduce the error using DAV Explorer and DAV Explorer pops up an error on the client side before it attempts the DAV commands.


You could argue that this is a weakness if the DAV protocol, but it could be easily remedied by a client-side check of the filename before it sends the DAV commands.

Does anyone have any suggestions on how to get around this issue? I could disable MOVEs on the server, but then you lose the ability to rename a file.
View user's profileFind all posts by ndaySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
I think Apache Group will be interested in your report. Smile
It does not look like any problem on the phped end.
WEB dav should not even attempt to delete directory if this operation was not requested. Even though if file rename was called with blank file name. HTTP/5xx error would be more adequate
Please submit Apache bug error report.

And yes, check for blank file name will be added to the webdav client, just to avoid further errors.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
renaming file with blank filename deletes dir using webDAV?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic