After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721543 - gvfs / nautilus can't open a folder with • in the name
gvfs / nautilus can't open a folder with • in the name
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: webdav backend
1.18.x
Other Linux
: Normal major
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-05 08:31 UTC by gnome
Modified: 2014-04-02 19:50 UTC
See Also:
GNOME target: ---
GNOME version: 3.9/3.10


Attachments
dav: Unescape URIs before comparing them for equality (1.61 KB, patch)
2014-03-16 16:12 UTC, Ross Lagerwall
needs-work Details | Review
dav: Unescape URIs before comparing them for equality (1.67 KB, patch)
2014-03-22 08:07 UTC, Ross Lagerwall
committed Details | Review

Description gnome 2014-01-05 08:31:01 UTC
In nautilus I mounted a dav://-server on port 80. When I try to open a folder with the name "•WORKFLOW•" it gives a "Moved permanatly" error. I can not open that folder. On the local file-system everything goes oke.

Additional info:
* gvfs-1.18.3-1 , nautilus 3.10.1.1
Comment 1 Cosimo Cecchi 2014-02-18 03:25:02 UTC
-> gvfs

Sounds like a bug in the gvfs webdav backend.
Comment 2 Ondrej Holy 2014-02-27 13:54:47 UTC
I've got free webdav account on:
http://www.ajaxfilebrowser.com

and renamed file and dir to have "•" in the name. I've successfully listed the directory containing the file by gvfs-ls and also by the Nautilus...

Are you able to reproduce it using account from http://www.ajaxfilebrowser.com?
Comment 3 Ondrej Holy 2014-02-27 13:58:10 UTC
I tested it on my updated Fedora 20 with:
gvfs-1.18.3-2.fc20
nautilus-3.10.1-3.fc20
Comment 4 Ross Lagerwall 2014-03-16 16:12:10 UTC
Created attachment 272071 [details] [review]
dav: Unescape URIs before comparing them for equality

In some instances (e.g. Apache), gvfs uses percent encodings like %2A
while Apache returns redirections encoded like %2a.  This makes
redirections fail when non-ascii characters are used in the path.
Comment 5 Ross Lagerwall 2014-03-16 16:13:59 UTC
I reproduced against an Apache 2.4 Webdav server. The problem is that it returns a path like /dav/%e2%80%a2WORKFLOW%e2%80%a2/ while gvfs tries to match it against /dav/%E2%80%A2WORKFLOW%E2%80%A2 which fails because the case is different. So the easiest fix is to unescape the paths before comparing them.
Comment 6 Ondrej Holy 2014-03-21 15:07:09 UTC
Review of attachment 272071 [details] [review]:

Looks good, thanks.
Comment 7 Ondrej Holy 2014-03-21 15:08:44 UTC
Review of attachment 272071 [details] [review]:

::: daemon/gvfsbackenddav.c
@@ +239,3 @@
 
+  ua = g_uri_unescape_string (a, "/");
+  ub = g_uri_unescape_string (b, "/");

But you should probably check whether ua, ub isn't NULL...
Comment 8 Ross Lagerwall 2014-03-22 08:07:04 UTC
Created attachment 272617 [details] [review]
dav: Unescape URIs before comparing them for equality

In some instances (e.g. Apache), gvfs uses percent encodings like %2A
while Apache returns redirections encoded like %2a.  This makes
redirections fail when non-ascii characters are used in the path.
Comment 9 Ondrej Holy 2014-03-27 12:59:59 UTC
Review of attachment 272617 [details] [review]:

Looks good, thanks.
Comment 10 Ross Lagerwall 2014-03-29 13:41:42 UTC
Pushed to master as 50af53dad6c6d6df4ba03ac04a6c6c76d2ba2337. Thanks!