sabre-io / dav

sabre/dav is a CalDAV, CardDAV and WebDAV framework for PHP
http://sabre.io
BSD 3-Clause "New" or "Revised" License
1.51k stars 345 forks source link

Filename with '+' in it is rejected #274

Closed evert closed 11 years ago

evert commented 11 years ago

Original author: arvi...@gmail.com (July 04, 2012 10:42:17)

What steps will reproduce the problem?

  1. Name a file like "Test + Test.txt"
  2. try to upload/download it
  3. Fails.

What is the expected output? What do you see instead? Expected: Successful up-/download

What version of the product are you using? What client software are you using? 1.6.3

Please provide any additional information below.

Original issue: http://code.google.com/p/sabredav/issues/detail?id=222

evert commented 11 years ago

From evert...@gmail.com on July 04, 2012 10:47:44: Hi Arvicor,

This sounds like a client-specific bug. A + is interpreted as a space in urls. Can you record this session using Charles and upload it here?

This will help me find a workaround.

evert commented 11 years ago

From arvi...@gmail.com on July 04, 2012 11:05:14: Hi! I'm running W7x64SP1 and tried to send a file using

Other users of ownCloud complained about such a problem, too.

My record is attached (using windows internal WebDAV client). Error shown, while saving "Test + Test file.txt": Insufficient space on target. The file was created, but is empty.

Regards!

evert commented 11 years ago

From evert...@gmail.com on July 04, 2012 11:52:55: Welp! This is a different error entirely.

Getting this back:


Catchable fatal error: Argument 2 passed to Sabre_CalDAV_Plugin::beforeWriteContent() must implement interface Sabre_DAV_IFile, none given in /home/project-web/sabredav/htdocs/demo/SabreDAV/lib/Sabre/CalDAV/Plugin.php on line 618

evert commented 11 years ago

From arvi...@gmail.com on July 04, 2012 12:00:20: What means....? How can I help?

evert commented 11 years ago

From evert...@gmail.com on July 04, 2012 12:01:11: This issue was closed by revision f4ccbcdac7f4.

evert commented 11 years ago

From evert...@gmail.com on July 04, 2012 12:02:41: Hi!

Would you mind giving this download a shot:

https://github.com/evert/SabreDAV/zipball/1.6

If it works, I will try to release today or tomorrow.

evert commented 11 years ago

From arvi...@gmail.com on July 04, 2012 12:10:09: ownCloud sync crashes after: 07-04 14:05:54:171 csync.propagator - Remote repository atomar push enabled for ownclouds://server/owncloud/files/webdav.php/clientsync/Test + Test.txt (0). 07-04 14:05:54:171 csync.owncloud - => open called for ownclouds://server/owncloud/files/webdav.php/clientsync/Test + Test.txt 07-04 14:05:54:171 csync.owncloud - Stating directory ownclouds://server/owncloud/files/webdav.php/clientsync 07-04 14:05:54:171 csync.owncloud - Dir ownclouds://server/owncloud/files/webdav.php/clientsync is there, we know it already. 07-04 14:05:54:171 csync.owncloud - win32 tmp path: C:\Users\username\AppData\Local\Temp\ 07-04 14:05:54:172 csync.owncloud - opening temp directory C:\Users\username\AppData\Local\Temp\csync.21qcra: 4 07-04 14:05:54:172 csync.owncloud - PUT request on /owncloud/files/webdav.php/clientsync/Test%20%2b%20Test.txt! 07-04 14:05:54:172 csync.owncloud - Putting file through memory cache. 07-04 14:05:54:174 csync.owncloud - Error - PUT status value no 2xx

Related to this IIS log entry 2012-07-04 12:05:54 192.168.30.1 PUT /owncloud/files/webdav.php/clientsync/Test+++Test.txt - 443 - 192.168.30.10 csyncoC/0.50.7+neon/0.29.6 404 11 0 0

evert commented 11 years ago

From evert...@gmail.com on July 04, 2012 12:17:37: This looks like a different issue :)

Can you send me a charles session again?

evert commented 11 years ago

From arvi...@gmail.com on July 04, 2012 12:18:47: I'm afraid, ownCLoud sync doesn'T seem to support proxies.....

evert commented 11 years ago

From evert...@gmail.com on July 04, 2012 12:21:32: Right! This makes sense..

Ok, this bug is an 'owncloud sync' bug. As you can see " + " is encoded as "+++" and not "%20+%20". This means that they use an incorrect url encoding.

Spaces should not be encoded as + in the 'path' part of a url. They may be encoded as + in the query-string part of a url.

So I'm closing this ticket. If you're opening a ticket for owncloud-sync, feel free to drop the ticket url here. Curious what they say :)

evert commented 11 years ago

From arvi...@gmail.com on July 04, 2012 12:44:50: Here you are http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-1208

Thanks!

evert commented 11 years ago

From drago...@gmail.com on July 06, 2012 08:24:51: ownCloud client encodes the PUT path to Test%20%2b%20Test.txt as you can see in the log file which should be fine. Somehow the IIS 7 double encoding issue as described in http://support.microsoft.com/kb/942076/en-us seems to do funny things to the url.

True is, however, that ownCloud client currently does not yet support proxies.

evert commented 11 years ago

From arvi...@gmail.com on July 06, 2012 08:27:56: Yeah, I've seen that KB a couple of hours before. Problem seems to be fixed, so this was an IIS7(.5) specific symptom. :) Thanks for your help!

evert commented 11 years ago

From evert...@gmail.com on July 06, 2012 11:07:15: Welp. This is good info; I'll add it to the wiki too