mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Fix use of rsplit for IPv6 addresses.
This commit is contained in:
parent
b3009085aa
commit
0514a64209
@ -239,7 +239,7 @@ class Servers(registry.SpaceSeparatedListOfStrings):
|
||||
|
||||
def convert(self, s):
|
||||
s = self.normalize(s)
|
||||
(server, port) = s.rsplit(':', 2)
|
||||
(server, port) = s.rsplit(':', 1)
|
||||
port = int(port)
|
||||
return (server, port)
|
||||
|
||||
@ -261,7 +261,7 @@ class SocksProxy(registry.String):
|
||||
if ':' not in v:
|
||||
self.error()
|
||||
try:
|
||||
int(v.rsplit(':', 2)[1])
|
||||
int(v.rsplit(':', 1)[1])
|
||||
except ValueError:
|
||||
self.error()
|
||||
super(SocksProxy, self).setValue(v)
|
||||
|
Loading…
Reference in New Issue
Block a user