fix: update

parent 78c7efe8
......@@ -162,15 +162,19 @@ class ProxyNamespace(BaseNamespace):
logger.debug(message)
token = message.get('token', None)
secret = message.get('secret', None)
if token or secret:
self.emit('data', "\nOperation not permitted!")
connection = str(uuid.uuid4())
self.emit('room', {'room': connection, 'secret': secret})
if not (token or secret):
logger.debug("token or secret is None")
self.emit('data', {'data': "\nOperation not permitted!", 'room': connection})
self.emit('disconnect')
return None
host = self.app.service.get_token_asset(token).json()
host = self.app.service.get_token_asset(token)
logger.debug(host)
if host:
self.emit('data', "\nOperation not permitted!")
if not host:
logger.debug("host is None")
self.emit('data', {'data': "\nOperation not permitted!", 'room': connection})
self.emit('disconnect')
return None
......
......@@ -20,7 +20,7 @@ Jinja2==2.10
jmespath==0.9.3
jms-es-sdk==0.5.2
jms-storage==0.0.12
jumpserver-python-sdk==0.0.36
jumpserver-python-sdk==0.0.37
MarkupSafe==1.0
oss2==2.4.0
paramiko==2.4.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment