passiomatic / coldsweat

Web RSS aggregator and reader compatible with the Fever API
MIT License
145 stars 21 forks source link

Support password-protected feeds #81

Closed tewe closed 9 years ago

tewe commented 9 years ago

Feeds using basic auth already work if you put them directly into the database:

https://myname:mypass@www.domain.com/myfeed

To make the web interface work utilities.is_valid_url needs adjusting.

passiomatic commented 9 years ago

Yeah, current regexp doesn't take into account the user:pass bit. Also the discussion here is interesting: http://stackoverflow.com/questions/827557/how-do-you-validate-a-url-with-a-regular-expression-in-python

The current Django URL implementation is a monster. With Coldsweat validator I was after to catch the most obvious malformed URL's.

Care to expand the current regexp to include auth information?

tewe commented 9 years ago

I can't test with IPv6. Would the rest of the code even work with http://[0:ab:cd]/feed?

passiomatic commented 9 years ago

No need to include support for IPv6, I was referring your willingness to edit the regexp to include the user:password bit. :)

tewe commented 9 years ago

I like to do things right. Oh well, just make this the second line:

r'(?:[^:@/]+:[^:@/]+@)?'  # credentials