mirror of
https://github.com/certbot/certbot.git
synced 2026-03-23 10:53:11 -04:00
correctly parse ipv6 address
This commit fixes the wrong used indexes for parsing the ipv6 address.
This commit is contained in:
parent
d2a96efa8e
commit
9b08fd3964
1 changed files with 2 additions and 2 deletions
|
|
@ -115,8 +115,8 @@ class Addr(object):
|
|||
endIndex = str_addr.rfind(']')
|
||||
host = str_addr[:endIndex + 1]
|
||||
port = ''
|
||||
if len(str_addr) > endIndex + 3 and str_addr[endIndex + 2] == ':':
|
||||
port = str_addr[endIndex + 3:]
|
||||
if len(str_addr) > endIndex + 2 and str_addr[endIndex + 1] == ':':
|
||||
port = str_addr[endIndex + 2:]
|
||||
return cls((host, port))
|
||||
else:
|
||||
tup = str_addr.partition(':')
|
||||
|
|
|
|||
Loading…
Reference in a new issue