LFTP backend crashes on empty remote path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I use Duplicity 0.7.01 running on Python 2.7.9 on a current Arch Linux. My target file system is an FTP server which I access using the LFTP backend. When accessing my backup target using an URL like "ftp://<email address hidden>/", the LFTP backend immediately crashes with the following error:
LFTP version is 4.6.1
Benutze temporäres Verzeichnis /tmp/duplicity-
Traceback (most recent call last):
File "/usr/bin/
with_
File "/usr/bin/
fn()
File "/usr/bin/
action = commandline.
File "/usr/lib/
globals.backend = backend.
File "/usr/lib/
obj = get_backend_
File "/usr/lib/
return factory(pu)
File "/usr/lib/
if self.remote_
IndexError: string index out of range
due to "self.remote_path" being empty. The attached patch seems to resolve the issue.
Changed in duplicity: | |
importance: | Undecided → Medium |
milestone: | none → 0.7.02 |
status: | New → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
The patch does not do what you want:
>>> re.sub('^/.+', '', '/')
'/'
>>> re.sub('^/.+', '', '/foo')
''
On Thu, Jan 22, 2015 at 5:14 PM, Adam Reichold <email address hidden>
wrote:
> Public bug reported: XNJ6L_- tempdir duplicity" , line 1500, in <module> duplicity" , line 1494, in with_tempdir duplicity" , line 1327, in main ProcessCommandL ine(sys. argv[1: ]) python2. 7/site- packages/ duplicity/ commandline. py", line get_backend( args[0] ) python2. 7/site- packages/ duplicity/ backend. py", line 221, object( url_string) python2. 7/site- packages/ duplicity/ backend. py", line 207, python2. 7/site- packages/ duplicity/ backends/ lftpbackend. py", line path[-1] != '/': /bugs.launchpad .net/bugs/ 1413792/ +attachment/ 4303869/ +files/ empty-remote- path.diff /bugs.launchpad .net/bugs/ 1413792 XNJ6L_- tempdir duplicity" , line 1500, in <module> duplicity" , line 1494, in with_tempdir duplicity" , line 1327, in main ProcessCommandL ine(sys. argv[1: ]) python2. 7/site- packages/ duplicity/ commandline. py", line get_backend( args[0] ) python2. 7/site- packages/ duplicity/ backend. py", line object( url_string) python2. 7/site- packages/ duplicity/ backe.. .
>
> I use Duplicity 0.7.01 running on Python 2.7.9 on a current Arch Linux.
> My target file system is an FTP server which I access using the LFTP
> backend. When accessing my backup target using an URL like
> "ftp://<email address hidden>/", the LFTP backend immediately crashes with the
> following error:
>
> LFTP version is 4.6.1
> Benutze temporäres Verzeichnis /tmp/duplicity-
> Traceback (most recent call last):
> File "/usr/bin/
> with_tempdir(main)
> File "/usr/bin/
> fn()
> File "/usr/bin/
> action = commandline.
> File "/usr/lib/
> 1047, in ProcessCommandLine
> globals.backend = backend.
> File "/usr/lib/
> in get_backend
> obj = get_backend_
> File "/usr/lib/
> in get_backend_object
> return factory(pu)
> File
> "/usr/lib/
> 73, in __init__
> if self.remote_
> IndexError: string index out of range
>
> due to "self.remote_path" being empty. The attached patch seems to
> resolve the issue.
>
> ** Affects: duplicity
> Importance: Undecided
> Status: New
>
> ** Patch added: "Patch to only remove leading slash if it is not also
> trailing"
>
> https:/
>
> --
> You received this bug notification because you are subscribed to
> Duplicity.
> https:/
>
> Title:
> LFTP backend crashes on empty remote path
>
> Status in Duplicity - Bandwidth Efficient Encrypted Backup:
> New
>
> Bug description:
> I use Duplicity 0.7.01 running on Python 2.7.9 on a current Arch
> Linux. My target file system is an FTP server which I access using the
> LFTP backend. When accessing my backup target using an URL like
> "ftp://<email address hidden>/", the LFTP backend immediately crashes with
> the following error:
>
> LFTP version is 4.6.1
> Benutze temporäres Verzeichnis /tmp/duplicity-
> Traceback (most recent call last):
> File "/usr/bin/
> with_tempdir(main)
> File "/usr/bin/
> fn()
> File "/usr/bin/
> action = commandline.
> File "/usr/lib/
> 1047, in ProcessCommandLine
> globals.backend = backend.
> File "/usr/lib/
> 221, in get_backend
> obj = get_backend_
> File "/usr/lib/