Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 458110 - net-fs/curlftpfs-0.9.2 fails with special characters in dir names
Summary: net-fs/curlftpfs-0.9.2 fails with special characters in dir names
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Network Filesystems
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-02-18 12:47 UTC by Jaakko Perttilä
Modified: 2013-07-25 12:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
curlftpfs-0.9.2-URL-encode-paths-for-curlftpfs.patch (curlftpfs-0.9.2-URL-encode-paths-for-curlftpfs.patch,2.03 KB, patch)
2013-06-07 05:24 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaakko Perttilä 2013-02-18 12:47:52 UTC
curlftps experiences an endless loop with '#'-dirs and gets i/o errors with '%%'-dirs.

Please apply URL encode patch from:
https://github.com/jomat/curlftpfs/commit/da20298fd0d0dcefc7d6d69ffecbc5544e783cfe


Reproducible: Always
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2013-06-06 20:41:45 UTC
Patch looks slightly leaky.
I'll try to see if it's harmless otherwise.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2013-06-07 05:24:55 UTC
Created attachment 350318 [details, diff]
curlftpfs-0.9.2-URL-encode-paths-for-curlftpfs.patch

I've added 'epatch_user' support for curlftpfs:

> 07 Jun 2013; Sergei Trofimovich <slyfox@gentoo.org> curlftpfs-0.9.2-r2.ebuild:
> Added 'epatch_user' to ease experiments with unofficial fixes (like in bug
> #458110 by Jaakko Perttilä).

It won't add your patch into ebuilds, but allows
placing it to /etc/portage/patches/net-fs/curlftpfs/

Just copy it there to test a bit. If nothing will break i'll add it
to the ebuild itself in some days.
Comment 3 Jaakko Perttilä 2013-06-07 11:43:49 UTC
Thanks for checking this.

That patch isn't mine, just found it when I was experiencing those errors.
It seemed to work fine on x86 and amd64 and after that I posted this bug report.
I only used it to backup few old ftp-only webhosts with rsync.

I tested just now a little bit more with the compilation from february with the patch applied.

Found this:
'mkdir ö' on curlftps mount with the patch, got error and the target has dir "%c3%b6". I cannot rmdir "%c3%b6" nor "ö". Then I created a valid dir "ö" with ftp, and cannot remove it with curlftps.

- So, the patch doesn't work completely, likely only for read operations, which I didn't test back then.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2013-06-07 18:38:17 UTC
Yeah, patch overquotes things a bit.
I think i'll be able to tune it a bit.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2013-07-25 12:09:05 UTC
Finally got to it and fixed in a bit more invasive way:

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-fs/curlftpfs/files/curlftpfs-0.9.2-fix-escaping.patch?revision=1.2&view=markup

Pyshed as -r3:

>*curlftpfs-0.9.2-r3 (25 Jul 2013)
> 
>  25 Jul 2013; Sergei Trofimovich <slyfox@gentoo.org>
>  +curlftpfs-0.9.2-r3.ebuild, +files/curlftpfs-0.9.2-fix-escaping.patch:
>  Fixed pathname escaping when passed to libcurl (bug #458110 by Jaakko
>  Perttilä). Fix heavily based on patch by jomat <jomat@copete.de>.

Thanks for the report and provided fixes!

Please, give it a try and see if it works for you.