mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #14036: return None when port in urlparse cross 65535
This commit is contained in:
parent
346c5de08e
commit
2fc5a50809
3 changed files with 11 additions and 0 deletions
|
@ -143,6 +143,9 @@ class _NetlocResultMixinBase(object):
|
|||
port = self._hostinfo[1]
|
||||
if port is not None:
|
||||
port = int(port, 10)
|
||||
# Return None on an illegal port
|
||||
if not ( 0 <= port <= 65535):
|
||||
return None
|
||||
return port
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue