Message334923
Thanks for your report. I'm having a hard time understanding your English. If I understand you correctly, your bug report is about the open_local_file() method and the surprising fact that urllib supports the local_file schema.
I agree, this looks like an implementation artefact. urllib should not expose the local_file schema. In Python 3 refuses local_file:// (tested with 3.4 to 3.7).
>>> import urllib.request
>>> urllib.request.urlopen('local_file:///etc/passwd').read()[:30]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/usr/lib64/python3.6/urllib/request.py", line 549, in _open
'unknown_open', req)
File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 1388, in unknown_open
raise URLError('unknown url type: %s' % type)
urllib.error.URLError: <urlopen error unknown url type: local_file> |
|
Date |
User |
Action |
Args |
2019-02-06 10:53:54 | christian.heimes | set | recipients:
+ christian.heimes, martin.panter, matrixise, push0ebp |
2019-02-06 10:53:52 | christian.heimes | set | messageid: <1549450432.64.0.020841312135.issue35907@roundup.psfhosted.org> |
2019-02-06 10:53:52 | christian.heimes | link | issue35907 messages |
2019-02-06 10:53:52 | christian.heimes | create | |
|