Author christian.heimes
Recipients christian.heimes, martin.panter, matrixise, push0ebp
Date 2019-02-06.10:53:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1549450432.64.0.020841312135.issue35907@roundup.psfhosted.org>
In-reply-to
Content
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>
History
Date User Action Args
2019-02-06 10:53:54christian.heimessetrecipients: + christian.heimes, martin.panter, matrixise, push0ebp
2019-02-06 10:53:52christian.heimessetmessageid: <1549450432.64.0.020841312135.issue35907@roundup.psfhosted.org>
2019-02-06 10:53:52christian.heimeslinkissue35907 messages
2019-02-06 10:53:52christian.heimescreate