mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Stricter verification for file based url scheme and reliance on ftp protocol.
This commit is contained in:
parent
0d62f5bbfe
commit
2ef16328e8
2 changed files with 5 additions and 1 deletions
|
@ -1188,7 +1188,8 @@ class FileHandler(BaseHandler):
|
|||
# Use local file or FTP depending on form of URL
|
||||
def file_open(self, req):
|
||||
url = req.selector
|
||||
if url[:2] == '//' and url[2:3] != '/':
|
||||
if url[:2] == '//' and url[2:3] != '/' and (req.host and
|
||||
req.host != 'localhost'):
|
||||
req.type = 'ftp'
|
||||
return self.parent.open(req)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue