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 743298 - Dav backend crashes if filename contains percentage sign (%)
Dav backend crashes if filename contains percentage sign (%)
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: webdav backend
1.20.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2015-01-21 14:03 UTC by Gabor Kelemen
Modified: 2015-01-22 07:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
don't unescape the uri twice (2.27 KB, patch)
2015-01-21 15:49 UTC, Ondrej Holy
committed Details | Review

Description Gabor Kelemen 2015-01-21 14:03:50 UTC
I'm using gvfs 1.20.1 on Ubuntu Trusty.

If I try to open a folder in Nautilus on a webdav server that contains a file or folder with a percentage sign in its name, I get an error saying the connection was closed, and gvfsd-dav disappears from the list of processes.

Uploading or creating such files works, but opening the folder or trying to overwrite them (with themselves, as part of a directory structure) causes a crash.
Comment 1 Gabor Kelemen 2015-01-21 14:44:59 UTC
One more data: if there are URL-encoding numbers after the %, it does not crash. For example:
"TÁMOP%20problémák_KIH[2].doc" - works, "kifizetesi_kerelem_ibzb 70%.pdf" - crashes, "FW Közlemény megjelenése- EKOP 30-70% allokációs kulcs módosítás.msg" - crashes, "test%" - crashes.
Comment 2 Ondrej Holy 2015-01-21 15:26:47 UTC
Thanks for your report.

It is caused by the patch from bug 721543, because decoding the filename fails and strcmp segfaulted...
Comment 3 Ondrej Holy 2015-01-21 15:49:22 UTC
Created attachment 295112 [details] [review]
don't unescape the uri twice

path_equal tries to unescape path before comparing. Unfortunately this function is used also for already unescaped paths. Therefore unescaping can fail. This commit reverts changes which was done in commit 50af53d and unescape just uris, which aren't unescaped yet.
Comment 4 Ross Lagerwall 2015-01-21 17:19:36 UTC
Review of attachment 295112 [details] [review]:

Looks good!
Comment 5 Ondrej Holy 2015-01-22 07:38:59 UTC
Comment on attachment 295112 [details] [review]
don't unescape the uri twice

Thanks for review! Pushed to master, gnome-3-14 and gnome-3-12 as:
commit f81ff2108ab3b6e370f20dcadd8708d23f499184
commit abc69427fc9985f6bc1ebe9a14d645f4805deca4
commit 0abdd97989d5274d84017490aff3bf07a71fd672