#400 RSS - http Authentication

open
5
2012-09-06
2009-06-27
patrick232
No

id like to add a password-protected feed to the rss-accnounce-plugin

rss add http://user:password@my.feed.com/rss.xml

currently supybot tells me that this is not a valid URL

Discussion

  • Aron Griffis

    Aron Griffis - 2010-03-24

    I just ran headlong into this, trying to hook supybot up to an authenticated trac rss feed. Sure would be nice to see this fixed

     
  • Aron Griffis

    Aron Griffis - 2010-03-24

    The strange thing is that feedparser supports authenticated feeds, so this seems to be stumbling somewhere in supybot

     
  • Aron Griffis

    Aron Griffis - 2010-03-24

    This does the trick:

    --- utils/web.py.orig 2010-03-24 18:15:40.000000000 -0400
    +++ utils/web.py 2010-03-24 18:17:36.091653167 -0400
    @@ -50,10 +50,11 @@
    # Base domain regex off RFC 1034 and 1738
    label = r'[0-9a-z][-0-9a-z][0-9a-z]?'
    domain = r'%s(?:.%s)
    .[a-z][-0-9a-z][a-z]?' % (label, label)
    -urlRe = re.compile(r'(\w+://(?:%s|%s)(?::\d+)?(?:/[^])>\s]
    )?)'
    - % (domain, ipAddr), re.I)
    -httpUrlRe = re.compile(r'(https?://(?:%s|%s)(?::\d+)?(?:/[^])>\s])?)'
    - % (domain, ipAddr), re.I)
    +auth = r'[^/:@]+:[^/@]+@'
    +urlRe = re.compile(r'(\w+://(?:%s)?(?:%s|%s)(?::\d+)?(?:/[^])>\s]
    )?)'
    + % (auth, domain, ipAddr), re.I)
    +httpUrlRe = re.compile(r'(https?://(?:%s)?(?:%s|%s)(?::\d+)?(?:/[^])>\s]*)?)'
    + % (auth, domain, ipAddr), re.I)

    REFUSED = 'Connection refused.'
    TIMED_OUT = 'Connection timed out.'

     

Log in to post a comment.