Make sure the port is a simple string
getaddrinfo() gladly allows unicode for the host, but the port must be in ascii (e.g. "https"). Make sure this is properly converted before we pass it on. Patch by @caderize on GitHub.
This commit is contained in:
parent
6a268a09b6
commit
b46fab5608
|
@ -65,10 +65,12 @@ class BaseTokenAPI(BasePlugin):
|
|||
# should go
|
||||
|
||||
# we import things on demand so that other plugins
|
||||
# in this file can be used w/o unecessary dependencies
|
||||
# in this file can be used w/o unnecessary dependencies
|
||||
|
||||
def process_result(self, resp):
|
||||
return resp.text.split(':')
|
||||
host, port = resp.text.split(':')
|
||||
port = port.encode('ascii','ignore')
|
||||
return [ host, port ]
|
||||
|
||||
def lookup(self, token):
|
||||
import requests
|
||||
|
|
Loading…
Reference in New Issue