Modify

Opened 5 years ago

#7248 new defect

Doesn't work with password protected feeds

Reported by: anonymous Owned by: smithsos
Priority: normal Component: RssEmbedMacro
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

feedparser allows passing a username and password in the URl like this:

  • http://username:password@feedparser.org/docs/examples/basic_auth.xml'

See the docs here: http://feedparser.org/docs/http-authentication.html.

However this doesn't work in RssEmbed because the macro also passes the URL to the urlopen function, which doesn't understand the syntax: it thinks 'password' is a port because of the semicolon. I guess the urlopen is done to provide more detailed error reporting in the event of a failure, but in this case it causes the failure.

Workaround is to comment out the call to urlopen.

Maybe a proper fix would involve passing the username and password as separate parameters, then urlopen could still be called on the actual url. The macro would then construct the extended url expected by feedparser.

Tested with trac 0.12b1.

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

Action
as new The owner will remain smithsos.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.