[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Duplicity-talk] URL decode username and password
From: |
Dan Muresan |
Subject: |
[Duplicity-talk] URL decode username and password |
Date: |
Mon, 09 Jun 2008 09:47:41 +0300 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080505) |
Hi all,
I've tried to use duplicity on a DAV host and ran intro problems. After
struggling with it, I've traced these problems to the fact that
parsed_url.username is never URL decoded in backends.py.
My username is an e-mail address, so I supply a URL like
webdav://USER%40HOST.COM:address@hidden/dav
Duplicity needs to accept url-encoded usernames and passwords, otherwise
it's impossible to include special chars in these. In fact I'm surprised
that this was not taken into account, given that there is no other
avenue to supply a username...
The fix is simple: for usernames, replace parsed_url.username with
urllib.unquote (parsed_url.username)
in backends.py. This probably helps the FTP backend too.
For the password, similarly change the get_password method to use
urllib.unquote (self.parsed_url.password) in backends.py.
Thanks,
Dan
- [Duplicity-talk] URL decode username and password,
Dan Muresan <=