mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Fix Issue6631 - Disallow relative file paths in urllib urlopen
This commit is contained in:
parent
002890861f
commit
3800ea9f65
4 changed files with 9 additions and 0 deletions
|
|
@ -160,6 +160,9 @@ class urlopen_FileTests(unittest.TestCase):
|
|||
for line in self.returned_obj:
|
||||
self.assertEqual(line, self.text)
|
||||
|
||||
def test_relativelocalfile(self):
|
||||
self.assertRaises(ValueError,urllib.request.urlopen,'./' + self.pathname)
|
||||
|
||||
class ProxyTests(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue