Add FTP to the allowed url schemes. Add Misc/NEWS.

This commit is contained in:
guido@google.com 2011-03-24 10:44:17 -07:00
parent 60a4a90c8d
commit 2bc23b8448
3 changed files with 9 additions and 4 deletions

View file

@ -643,10 +643,11 @@ class FancyURLopener(URLopener):
newurl = basejoin(self.type + ":" + url, newurl)
# For security reasons we do not allow redirects to protocols
# other than HTTP or HTTPS.
# other than HTTP, HTTPS or FTP.
newurl_lower = newurl.lower()
if not (newurl_lower.startswith('http://') or
newurl_lower.startswith('https://')):
newurl_lower.startswith('https://') or
newurl_lower.startswith('ftp://')):
return
void = fp.read()