google-code-export / feedparser

Automatically exported from code.google.com/p/feedparser
Other
1 stars 0 forks source link

FTP auth information stripped from the url #382

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Pass a ftp url with username/password e.g.
parse("ftp://username:password@192.168.1.2/rss.xml")

What is the expected output? What do you see instead?
I expect the xml file to be retrieved and parsed.
Instead it gives a bozo_exception.

The problem is that when handling username/password in the url, it removes the 
username and password from the url, which I presume it shouldn't with an ftp 
url.
Adding a test for ftp (nearby line 3025) solves the problem:

# test for inline user:password for basic auth
auth = None
if base64 and not urlparse.urlparse(url_file_stream_or_string)[0] == "ftp":

What version of the product are you using? On what operating system?
5.1.2

Please provide any additional information below.
Tested with proftp FTP server.

Original issue reported on code.google.com by bendi...@gmail.com on 16 Nov 2012 at 12:26

GoogleCodeExporter commented 9 years ago
Seems like a reasonable request, but my biggest concern is that this will be 
tough to run through the unit tests. I'll see what can be done. Thanks for 
reporting this!

Original comment by kurtmckee on 19 Nov 2012 at 4:15

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 5ac5244ddc52.

Original comment by kurtmckee on 28 Nov 2012 at 4:23