mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 19:31:51 +02:00
correctly parse ipv6 address
This commit fixes the wrong used indexes for parsing the ipv6 address.
This commit is contained in:
@@ -115,8 +115,8 @@ class Addr(object):
|
|||||||
endIndex = str_addr.rfind(']')
|
endIndex = str_addr.rfind(']')
|
||||||
host = str_addr[:endIndex + 1]
|
host = str_addr[:endIndex + 1]
|
||||||
port = ''
|
port = ''
|
||||||
if len(str_addr) > endIndex + 3 and str_addr[endIndex + 2] == ':':
|
if len(str_addr) > endIndex + 2 and str_addr[endIndex + 1] == ':':
|
||||||
port = str_addr[endIndex + 3:]
|
port = str_addr[endIndex + 2:]
|
||||||
return cls((host, port))
|
return cls((host, port))
|
||||||
else:
|
else:
|
||||||
tup = str_addr.partition(':')
|
tup = str_addr.partition(':')
|
||||||
|
|||||||
Reference in New Issue
Block a user