2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-27 19:37:57 +00:00

Catch missing '@' in token as invalid token

This commit is contained in:
Jarrod Johnson 2018-07-17 11:46:40 -04:00
parent 0d936e0059
commit fc5472065a

View File

@ -207,6 +207,7 @@ def handle_connection(connection, cert, request, local=False):
invitation = request['invitation']
try:
invitation = base64.b64decode(invitation)
name, invitation = invitation.split('@', 1)
except Exception:
tlvdata.send(
connection,
@ -214,7 +215,6 @@ def handle_connection(connection, cert, request, local=False):
{'status': 'Invalid token format'}})
connection.close()
return
name, invitation = invitation.split('@', 1)
host = request['server']
try:
remote = socket.create_connection((host, 13001))