mirror of
https://github.com/python/cpython.git
synced 2025-08-15 14:20:55 +00:00
Add FTP to the allowed url schemes. Add Misc/NEWS.
This commit is contained in:
parent
60a4a90c8d
commit
2bc23b8448
3 changed files with 9 additions and 4 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue