GNOME Bugzilla – Bug 743298
Dav backend crashes if filename contains percentage sign (%)
Last modified: 2015-01-22 07:39:17 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.
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.
Thanks for your report. It is caused by the patch from bug 721543, because decoding the filename fails and strcmp segfaulted...
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.
Review of attachment 295112 [details] [review]: Looks good!
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